Repository navigation
Expand file tree
/
Copy path.tmux.conf
More file actions
287 lines (253 loc) · 9.23 KB
/
Copy path.tmux.conf
File metadata and controls
287 lines (253 loc) · 9.23 KB
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
set -g default-terminal "screen-256color"
set-option -g history-limit 50000
unbind C-b
set -g prefix C-a
bind C-a send-prefix
setw -g mode-keys vi
set-window-option -g xterm-keys on
set -s escape-time 0
set -g extended-keys on
# I really like switching panes.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind C-h select-pane -L
bind C-j select-pane -D
bind C-k select-pane -U
bind C-l select-pane -R
# bind -n C-h select-pane -L
# bind -n C-j select-pane -D
# bind -n C-k select-pane -U
# bind -n C-l select-pane -R
# Set the status bar off.
set -g status off
# Toggle the status bar with Ctrl+F3 Combo
bind-key -n C-F3 set-option -g status
bind -n M-k copy-mode
bind -T copy-mode-vi M-k send-keys -X scroll-up
bind -T copy-mode-vi M-j send-keys -X scroll-down
# START: Enable off switch for nested sessions
bind -T root F10 \
set prefix None \;\
set key-table off \;\
# set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\
# set window-status-current-format "#[fg=$color_window_off_status_bg,bg=$color_window_off_status_current_bg]$separator_powerline_right#[default] #I:#W# #[fg=$color_window_off_status_current_bg,bg=$color_window_off_status_bg]$separator_powerline_right#[default]" \;\
# set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
bind -T off F10 \
set -u prefix \;\
set -u key-table \;\
# set -u status-style \;\
# set -u window-status-current-style \;\
# set -u window-status-current-format \;\
refresh-client -S
# wg_is_keys_off="#[fg=$color_light,bg=$color_window_off_indicator]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[default]"
# set -g status-right "$wg_is_keys_off #{sysstat_cpu} | #{sysstat_mem} | #{sysstat_loadavg} | $wg_user_host"
# END: Enable off switch for nested sessions
# bind -n WheelUpPane copy-mode
# bind -n WheelDownPane copy-mode
# bind -n M-Up copy-mode
# bind -T copy-mode-vi M-j send-keys -X scroll-up
# bind -T copy-mode-vi M-k send-keys -X scroll-down
# bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 2 scroll-up
# bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 2 scroll-down
# set-option -g mouse on
# make scrolling with wheels work
# 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-key -n Escape copy-mode
# set -g mouse on
# Sane scrolling
# set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
# bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
# set mouse-utf8 off
# set -g mode-mouse on
#
# unbind +
# bind + \
# new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
# swap-pane -s tmux-zoom.0 \;\
# select-window -t tmux-zoom
# unbind -
# bind - \
# last-window \;\
# swap-pane -s tmux-zoom.0 \;\
# kill-window -t tmux-zoom
# set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @plugin 'jbnicolai/tmux-fpp'
set -g @plugin 'tmux-plugins/tmux-sessionist'
# set -g @plugin 'jimeh/tmux-themepack'
# set -g @plugin 'seebi/tmux-colors-solarized'
# set -g @plugin 'arcticicestudio/nord-tmux'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# set -g @nord_tmux_no_patched_font "1"
# set -g @nord_tmux_show_status_content "0"
# set -g @colors-solarized 'base16'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
set -g @sidebar-tree-command 'tree -C'
# set -g @sidebar-tree-pager 'view -'
# paste from right click
# set -g mouse on
# unbind-key MouseDown3Pane
# bind-key -n MouseDown3Pane run " \
# X=$(xclip -o -sel clipboard); \
# tmux set-buffer \"$(xclip -o -sel clipboard)\"; \
# tmux paste-buffer -p; \
# "
# tmux display-message 'pasted!' \
# unbind -n MouseDown1Pane
# unbind -n MouseDown1Border
# unbind -n MouseDown1Status
# unbind -n MouseDown1StatusLeft
# unbind -n MouseDown1StatusRight
# unbind -n MouseDown1StatusDefault
# unbind -n MouseUp1Pane
# unbind -n MouseUp1Border
# unbind -n MouseUp1Status
# unbind -n MouseUp1StatusLeft
# unbind -n MouseUp1StatusRight
# unbind -n MouseUp1StatusDefault
# unbind -n MouseDrag1Pane
# unbind -n MouseDrag1Border
# unbind -n MouseDrag1Status
# unbind -n MouseDrag1StatusLeft
# unbind -n MouseDrag1StatusRight
# unbind -n MouseDrag1StatusDefault
# unbind -n MouseDragEnd1Pane
# unbind -n MouseDragEnd1Border
# unbind -n MouseDragEnd1Status
# unbind -n MouseDragEnd1StatusLeft
# unbind -n MouseDragEnd1StatusRight
# unbind -n MouseDragEnd1StatusDefault
# unbind -n DoubleClick1Pane
# unbind -n DoubleClick1Border
# unbind -n DoubleClick1Status
# unbind -n DoubleClick1StatusLeft
# unbind -n DoubleClick1StatusRight
# unbind -n DoubleClick1StatusDefault
# unbind -n TripleClick1Pane
# unbind -n TripleClick1Border
# unbind -n TripleClick1Status
# unbind -n TripleClick1StatusLeft
# unbind -n TripleClick1StatusRight
# unbind -n TripleClick1StatusDefault
# unbind -n MouseDown2Pane
# unbind -n MouseDown2Border
# unbind -n MouseDown2Status
# unbind -n MouseDown2StatusLeft
# unbind -n MouseDown2StatusRight
# unbind -n MouseDown2StatusDefault
# unbind -n MouseUp2Pane
# unbind -n MouseUp2Border
# unbind -n MouseUp2Status
# unbind -n MouseUp2StatusLeft
# unbind -n MouseUp2StatusRight
# unbind -n MouseUp2StatusDefault
# unbind -n MouseDrag2Pane
# unbind -n MouseDrag2Border
# unbind -n MouseDrag2Status
# unbind -n MouseDrag2StatusLeft
# unbind -n MouseDrag2StatusRight
# unbind -n MouseDrag2StatusDefault
# unbind -n MouseDragEnd2Pane
# unbind -n MouseDragEnd2Border
# unbind -n MouseDragEnd2Status
# unbind -n MouseDragEnd2StatusLeft
# unbind -n MouseDragEnd2StatusRight
# unbind -n MouseDragEnd2StatusDefault
# unbind -n DoubleClick2Pane
# unbind -n DoubleClick2Border
# unbind -n DoubleClick2Status
# unbind -n DoubleClick2StatusLeft
# unbind -n DoubleClick2StatusRight
# unbind -n DoubleClick2StatusDefault
# unbind -n TripleClick2Pane
# unbind -n TripleClick2Border
# unbind -n TripleClick2Status
# unbind -n TripleClick2StatusLeft
# unbind -n TripleClick2StatusRight
# unbind -n TripleClick2StatusDefault
# unbind -n MouseDown3Pane
# unbind -n MouseDown3Border
# unbind -n MouseDown3Status
# unbind -n MouseDown3StatusLeft
# unbind -n MouseDown3StatusRight
# unbind -n MouseDown3StatusDefault
# unbind -n MouseUp3Pane
# unbind -n MouseUp3Border
# unbind -n MouseUp3Status
# unbind -n MouseUp3StatusLeft
# unbind -n MouseUp3StatusRight
# unbind -n MouseUp3StatusDefault
# unbind -n MouseDrag3Pane
# unbind -n MouseDrag3Border
# unbind -n MouseDrag3Status
# unbind -n MouseDrag3StatusLeft
# unbind -n MouseDrag3StatusRight
# unbind -n MouseDrag3StatusDefault
# unbind -n MouseDragEnd3Pane
# unbind -n MouseDragEnd3Border
# unbind -n MouseDragEnd3Status
# unbind -n MouseDragEnd3StatusLeft
# unbind -n MouseDragEnd3StatusRight
# unbind -n MouseDragEnd3StatusDefault
# unbind -n DoubleClick3Pane
# unbind -n DoubleClick3Border
# unbind -n DoubleClick3Status
# unbind -n DoubleClick3StatusLeft
# unbind -n DoubleClick3StatusRight
# unbind -n DoubleClick3StatusDefault
# unbind -n TripleClick3Pane
# unbind -n TripleClick3Border
# unbind -n TripleClick3Status
# unbind -n TripleClick3StatusLeft
# unbind -n TripleClick3StatusRight
# unbind -n TripleClick3StatusDefault
# unbind -n WheelUpPane
# unbind -n WheelUpBorder
# unbind -n WheelUpStatus
# unbind -n WheelUpStatusLeft
# unbind -n WheelUpStatusRight
# unbind -n WheelUpStatusDefault
# unbind -n WheelDownPane
# unbind -n WheelDownBorder
# unbind -n WheelDownStatus
# unbind -n WheelDownStatusLeft
# unbind -n WheelDownStatusRight
# unbind -n WheelDownStatusDefault
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
# -fg and -bg are probably removed, use -style instaead
# set -g pane-border-fg magenta
# set -g pane-active-border-fg green
# set -g pane-active-border-bg default
# setw -g pane-border-status top
# setw -g pane-border-format '─'
# setw -g pane-border-fg colour8
# set -g pane-active-border-style fg=colour8
# set -g pane-active-border-style bg=default
#
# sed -n '/^» '$(...)'\s*$/,/^»/p' file | head -n -3 | tail -n +2 | xclip
# grep » file | sed 's/»//; /^\s*$/d' | fzf
# tmux capture-pane -p -J -S - > file
# bind " split-window -c "#{pane_current_path}""
bind '%' split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
bind c new-window -c '#{pane_current_path}' # Create new window'"'
set -g set-titles on
bind-key ! break-pane -d -n _hidden_pane
bind-key @ join-pane -s $.1