-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
executable file
·296 lines (235 loc) · 8.88 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
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
288
289
290
291
292
293
294
295
296
# $Id: t-williams.conf,v 1.1 2009/11/02 18:59:28 nicm Exp $
#
# ~/.tmux.conf - tmux terminal multiplexer config
# Thayer Williams (http://cinderwick.ca)
# "Feel free to do whatever you like with it."
# I typically start tmux from ~/.xinitrc with the following:
#
# urxvt -e bash -c "tmux attach -d -t mysession" &
#
# and recall it any time thereafter with xbindkeys (Mod4+s):
#
# "urxvt -e bash -c 'tmux attach -d -t mysession'"
# m:0x50 + c:39
# set prefix key to ctrl+a until I have time to adapt
unbind C-b
set -g prefix ^F
bind f send-prefix
# quick view of processes
#bind '~' split-window "exec top"
# scrollback buffer n lines
set -g history-limit 5000
# listen for activity on all windows
set -g bell-action any
# visual notification of activity in other windows
#setw -g monitor-activity on
set -g visual-activity on
#set -g default-terminal "screen-256color"
#set -g default-terminal "xterm-256color"
set -g default-terminal "rxvt-unicode-256color"
bind-key C-o last-window
# ctrl+left/right cycles thru windows
bind-key C-n next
bind-key C-p prev
set -g default-command zsh
# Bind function keys.
bind -n F1 select-window -t 1
bind -n F2 select-window -t 2
bind -n F3 select-window -t 3
bind -n F4 select-window -t 4
bind -n F5 select-window -t 5
bind -n F6 select-window -t 6
bind -n F7 select-window -t 7
bind -n F8 select-window -t 8
# start window indexing at one instead of zero
set -g base-index 1
bind-key C-k confirm kill-window
bind-key C-e confirm kill-pane
bind-key S command-prompt "new-window -n %1 'myssh %1'"
bind-key A command-prompt "rename-window %1"
bind R source-file ~/.tmux.conf\; display-message "Config reloaded..."
bind X break-pane
# more intuitive keybindings for splitting
#unbind %
#bind H split-window -v
#unbind '"'
#bind V split-window -h
bind C-b break-pane
# Clock
setw -g clock-mode-colour green
setw -g clock-mode-style 24
#bind-key j down-pane
#bind-key ^J down-pane
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
# explicitly disable mouse control
#setw -g mode-mouse off
#set -g mouse-select-pane off
#set -g mouse-resize-pane off
#set -g mouse-select-window off
bind 'l' set-window-option synchronize-panes on
bind 'm' set-window-option synchronize-panes off
#set -g terminal-overrides "xterm*:setab=\\E[4%p1%dm,xterm*:setaf=\\E[3%p1%dm"
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
set -g terminal-overrides "xterm*:XT:smcup@:rmcup@"
set -g set-titles on
#set-option -g set-titles-string '#S:#I.#P #W'
set-option -g set-titles-string '#T'
set-window-option -g automatic-rename on
# Pipe pane to log file
#bind-key P pipe-pane -o "cat >>$HOME/#W-tmux.log" \; display-message "Toggled logging to $HOME/#W-tmux.log"
#bind-key h pipe-pane \; display-message 'Ended logging to $HOME/#W-tmux.log'
bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
bind-key j join-pane -s !
### Test vim http://www.codeography.com/2013/06/19/navigating-vim-and-tmux-splits
## bind -n C-h run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
## bind -n C-j run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
## bind -n C-k run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
## bind -n C-l run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
##
# unicode
# setw -g utf8 on
# set -g status-utf8 on
# Highlighting the active window in status bar
set-window-option -g window-status-current-style bg=green
# set -g status-right "##(date +%H:%M)"
set -g status-left "#[fg=colour234, bg=colour148] #S:#I.#P #[fg=colour0, bg=colour33] #H "
#### Copy §/ paste
## Ctrlt,Escape # enter copy mode
## # move cursor to the start or end of the desired text string
## v # to activate highlighting
## # move cursor to cover the requisite string
## y # to capture the string
## q # exit copy mode
## Ctrlt,p # put/paste the text in the desired location
##
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
#### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-style "default"
# default window title colors
set-window-option -g window-status-style fg=colour244 #base0
set-window-option -g window-status-style bg=default
# set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-style fg=colour166 #orange
set-window-option -g window-status-current-style bg=default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-style fg=colour235 #base02
set-option -g pane-active-border-style fg=colour240 #base01
# message text
set-option -g message-style bg=colour235 #base02
set-option -g message-style fg=colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# bell
# set-window-option -g window-status-bell-style fg=colour235,bg=colour160 #base02, red
######################
### DESIGN CHANGES ###
######################
# panes
set -g pane-border-style fg=black
set -g pane-active-border-style fg=brightred
## Status bar design
# status line
# set -g status-utf8 on
set -g status-justify left
set -g status-bg default
set -g status-fg colour12
set -g status-interval 2
# messaging
set -g message-style fg=black
set -g message-style bg=yellow
set -g message-command-style fg=blue
set -g message-command-style bg=black
#window mode
setw -g mode-style bg=colour6
setw -g mode-style fg=colour0
# window status
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
setw -g window-status-current-style bg=colour0
setw -g window-status-current-style fg=colour11
setw -g window-status-current-style "dim"
setw -g window-status-style bg=green
setw -g window-status-style fg=black
setw -g window-status-style "reverse"
# Info on left (I don't have a session display for now)
set -g status-left ''
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
set -g default-terminal "screen-256color"
# The modes {
setw -g clock-mode-colour colour135
setw -g mode-style "bold"
setw -g mode-style fg=colour196
setw -g mode-style bg=colour238
# }
# The panes {
set -g pane-border-style bg=colour235
set -g pane-border-style fg=colour238
set -g pane-active-border-style bg=colour236
set -g pane-active-border-style fg=colour51
# }
# The statusbar {
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour137
set -g status-style "dim"
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style fg=colour81
setw -g window-status-current-style bg=colour238
setw -g window-status-current-style "bold"
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-style fg=colour138
setw -g window-status-style bg=colour235
setw -g window-status-style "none"
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style "bold"
setw -g window-status-bell-style fg=colour255
setw -g window-status-bell-style bg=colour1
# }
# The messages {
set -g message-style "bold"
set -g message-style fg=colour232
set -g message-style bg=colour166
# }
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'pwittchen/tmux-plugin-spotify'
set -g status-right "#[fg=colour136, bg=color235] #{spotify_song}, #{spotify_artist}, #{spotify_album} - #(date +%H:%M)"
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Cappucino
set -g @plugin 'catppuccin/tmux#v2.1.1' # See https://github.com/catppuccin/tmux/tags for additional tags
# ...alongside
set -g @plugin 'tmux-plugins/tpm'
set -g @catppuccin_flavor 'mocha' # latte, frappe, macchiato or mocha
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'