-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
237 lines (203 loc) · 6.94 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
####
# SETTINGS
#
if-shell '[[ $TERM =~ "linux" ]]' {
# set -g default-terminal "xterm-256color"
set -g default-terminal "alacritty"
# set -ag terminal-overrides ",*256col*:RGB:Ms=\E]52;%p1%s;%p2%s\007"
}
if-shell '[[ $TERM = "linux" ]]' {
set -g default-terminal "linux"
}
set -q -g -w utf8 on
set -g base-index 1
setw -g pane-base-index 1
setw -g automatic-rename on
set -g renumber-windows on
set -s escape-time 0
set -g history-limit 10000
set -g visual-bell off
set -g bell-action other
set -g mouse on
set -g set-clipboard on
set -g set-titles on
set -g set-titles-string '#{=20:window_name} @ #S[#I] [Tmux]'
setw -g aggressive-resize on
setw -g allow-rename on
setw -g clock-mode-style 12
setw -g display-panes-time 1500
setw -g mode-keys vi
setw -g monitor-activity on
setw -g monitor-silence 0
# simple single heavy double number
set -g pane-border-lines heavy
# set -g focus-events on # vim-tmux-clipboard
# THEME
#
set -g status-position bottom
set -g status-interval 8
set -g status-justify "left"
set -g pane-border-style fg=black
# set -ag pane-border-style bg=black
set -g pane-active-border-style fg=cyan
set -ag pane-active-border-style bg=black
set -g display-panes-colour grey
set -g display-panes-active-colour cyan
set -g status-style fg=cyan,bg=black
set -g message-style fg=cyan,bg=black
set -g status-left " "
set -g window-status-format " #[fg=cyan, none]#I#[fg=black, bold]: #[fg=white, none]#{=20:window_name}#[fg=black, bold]#{?window_zoomed_flag, Z,} "
set -g window-status-current-format "#[fg=black, bold]|#[fg=cyan, none][#[fg=white, none]#I#[fg=black, bold]: #[fg=white, none]#{=20:window_name}#[fg=black, bold]#{?window_zoomed_flag, Z,}#[fg=cyan, none]]#[fg=black, bold]|"
set -g status-right "\
#{?client_prefix,#[fg=green#,bold]- Prefix - ,}\
#[fg=white, none] #S \
#[fg=black, bold]@#[fg=white, none] #H\
#[fg=black, bold] | #[fg=white, none]%a %d %b, %I:%M %p "
set -g window-status-separator " "
set -g window-status-activity-style none
set -g status-left-length 1
set -g status-right-length 110
#[fg=color8, bold] | #[fg=cyan, none] #[fg=white]#(pipectrl.sh)\
#[fg=color8, bold] | #[fg=cyan, none]K #[fg=white]#(print-kbd-layout.sh)\
####
# HOTKEYS
#
unbind C-b
unbind M-w
unbind Escape
unbind x
set -g prefix M-w
bind M-w send-prefix
unbind C-s
bind C-s source-file ~/.tmux.conf
bind h if -F '#{pane_at_left}' '' 'select-pane -L'
bind l if -F '#{pane_at_right}' '' 'select-pane -R'
bind k if -F '#{pane_at_top}' '' 'select-pane -U'
bind j if -F '#{pane_at_bottom}' '' 'select-pane -D'
bind -n M-h if -F '#{pane_at_left}' '' 'select-pane -L'
bind -n M-l if -F '#{pane_at_right}' '' 'select-pane -R'
bind -n M-k if -F '#{pane_at_top}' '' 'select-pane -U'
bind -n M-j if -F '#{pane_at_bottom}' '' 'select-pane -D'
bind Left if -F '#{pane_at_left}' '' 'select-pane -L'
bind Right if -F '#{pane_at_right}' '' 'select-pane -R'
bind Up if -F '#{pane_at_top}' '' 'select-pane -U'
bind Down if -F '#{pane_at_bottom}' '' 'select-pane -D'
bind -n M-Left if -F '#{pane_at_left}' '' 'select-pane -L'
bind -n M-Right if -F '#{pane_at_right}' '' 'select-pane -R'
bind -n M-Up if -F '#{pane_at_top}' '' 'select-pane -U'
bind -n M-Down if -F '#{pane_at_bottom}' '' 'select-pane -D'
bind 1 select-window -t 1
bind 2 select-window -t 2
bind 3 select-window -t 3
bind 4 select-window -t 4
bind 5 select-window -t 5
bind 6 select-window -t 6
bind 7 select-window -t 7
bind 8 select-window -t 8
bind 9 select-window -t 9
bind 0 select-window -t 0
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
bind -n M-0 select-window -t 0
bind -n M-m select-pane -m
bind "'" select-pane -t '~'
bind -n M-"'" select-pane -t '~'
bind g display-panes
bind -n M-g display-panes
bind ` last-window
bind -n M-` last-window
bind o last-pane
bind -n M-o last-pane
bind b choose-tree -Z
bind -n M-b choose-tree -Z
# Operations
bind v split-window -h
bind -n M-v split-window -h
bind s split-window -v
bind -n M-s split-window -v
bind V split-window -hf
bind -n M-V split-window -hf
bind S split-window -vf
bind -n M-S split-window -vf
bind M-1 split-window -h \; split-window -v \; select-pane -L
bind M-2 split-window -v \; select-pane -U \; split-window -h \; select-pane -D
bind M-3 split-window -h \; split-window -h \; select-pane -L \; select-layout -E
bind M-4 split-window -h \; split-window -v \; select-pane -L \; split-window -v
bind t new-window
bind -n M-t new-window
bind . next-window
bind , previous-window
bind -n M-. next-window
bind -n M-, previous-window
bind > next-window \; swap-window -t '!'
bind < previous-window \; swap-window -t '!'
bind -n M-> next-window \; swap-window -t '!'
bind -n M-< previous-window \; swap-window -t '!'
bind z resize-pane -Z
bind -n M-z resize-pane -Z
bind d break-pane
bind -n M-d break-pane
bind a join-pane -hfd -t '!'
bind -n M-a join-pane -hf -t '!'
bind L select-pane -R \; swap-pane -s '!' \; select-pane -L
bind H select-pane -L \; swap-pane -s '!' \; select-pane -R
bind J select-pane -D \; swap-pane -s '!' \; select-pane -D
bind K select-pane -U \; swap-pane -s '!' \; select-pane -U
bind -n M-L select-pane -R \; swap-pane -s '!' \; select-pane -L
bind -n M-H select-pane -L \; swap-pane -s '!' \; select-pane -R
bind -n M-J select-pane -D \; swap-pane -s '!' \; select-pane -D
bind -n M-K select-pane -U \; swap-pane -s '!' \; select-pane -U
bind C-l resize-pane -R 5
bind C-h resize-pane -L 5
bind C-k resize-pane -U 5
bind C-j resize-pane -D 5
bind -n C-M-l resize-pane -R 5
bind -n C-M-h resize-pane -L 5
bind -n C-M-k resize-pane -U 5
bind -n C-M-j resize-pane -D 5
bind r rotate-window -D
bind R rotate-window -U
bind -n M-r rotate-window -D
bind -n M-R rotate-window -U
bind e select-layout -E
bind -n M-e select-layout -E
bind ! select-layout main-vertical \; select-layout -E
bind @ select-layout main-horizontal \; select-layout -E
bind '#' select-layout even-horizontal \; select-layout -E
bind $ select-layout tiled \; select-layout -E
# Misc
bind n command-prompt 'rename-window %%'
bind -n M-n command-prompt 'rename-window %%'
bind N command-prompt 'rename-session %%'
bind -n M-N command-prompt 'rename-session %%'
bind p paste-buffer
bind P choose-buffer
bind -n M-p paste-buffer
bind -n M-P choose-buffer
bind Space copy-mode
bind -n M-Space copy-mode
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'y' send -X copy-selection-and-cancel
bind -T copy-mode-vi 'd' send -X halfpage-down
bind -T copy-mode-vi 'u' send -X halfpage-up
bind -T copy-mode-vi 'Escape' send -X cancel
bind -T copy-mode-vi 'space' send -X clear-selection
bind -T copy-mode-vi 'bspace' send -X clear-selection
# Close pane
bind q kill-pane
bind -n M-q kill-pane
# Close window
bind Q kill-window
bind -n M-Q kill-window
# Detach session
bind D detach-client
bind -n M-D detach-client
# Close tmux server
bind C-q kill-server