-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux.conf
60 lines (46 loc) · 2.33 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#unbind C-b
set-option -g prefix C-d
bind-key C-d send-prefix
# Use | and - to split a window vertically and horizontally instead of " and % respoectively
unbind '"'
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind \; command-prompt
bind d display-panes
# Switch betewen panes using alt + arrow
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind -T root MouseDown2Pane run -b "xclip -o | tmux load-buffer - && tmux paste-buffer -s ' '"
# Use r to quickly reload tmux settings
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config'
set -g mouse on
set -g default-terminal 'tmux-256color'
set -g status on
set -g status-interval 1
set -g status-style fg=colour42,bg=colour236
set -g status-left-length 100
set -g status-left "#[bg=colour93,fg=colour236] #{pane_title} #[bg=colour54,fg=colour93]#[bg=colour54,fg=colour236] #(grep '^tbc=' ${HOME}/.pyuniti/config.ini|sed -e 's|^tbc.*/||') #[bg=colour236,fg=colour54] [#{session_name}]"
set -g status-right-length 60
set -g status-right "#[bg=colour236,fg=colour54]#[bg=colour54,fg=colour236] %H:%M:%S %d-%b-%y #[bg=colour54,fg=colour93]#[bg=colour93,fg=colour236] #H "
set -g status-justify centre
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
# To copy, left click and drag to highlight text in yellow,
# once you release left click yellow text will disappear and will automatically be available in clibboard
# # Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"