forked from tony/tmux-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
273 lines (231 loc) · 8.36 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
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-style bg=colour235,fg=colour136,default # bg=base02, fg=yellow
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window
# more natural splits key bindings
unbind %
bind | split-window -h
bind - split-window -v
# default window title colors
set-window-option -g window-status-style fg=colour244,bg=default,dim # fg=base0
# active window title colors
set-window-option -g window-status-current-style fg=colour166,bg=default,bright # fg=orange
# pane border
set-option -g pane-border-style fg=colour235 #fg=base02
set-option -g pane-active-border-style fg=colour240 #fg=base01
# message text
set-option -g message-style bg=colour235,fg=colour166 # bg=base02, fg=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 green #green
# For the number of windows: #S
# For the number of tabs: #I
# For the pane title: #{pane_title} or #T
# For the host name: #H
# For the host name: #H
set -g window-status-format " #W: #T "
set -g window-status-current-format " #W: #T "
#set-option -g set-titles on
#set -g set-titles-string '#I | #W'
#set-option -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name,active (or not)
# Activity monitoring
set-window-option -g monitor-activity off
setw -g monitor-activity off
set -g visual-activity off
# loud or quiet?
set-option -g visual-bell off
set-option -g bell-action none
set-option -g visual-silence off
# ideally the status-position will be at the top but it's only supported >1.8
set -g status-position top
set -g status-interval 7
set -g status-justify centre # center align window list
set -g status-left-length 20
set -g status-right-length 140
set -g status-left '#[fg=green]#I/#P'
set -g status-right '#[fg=red,dim,bg=default]#S'
#set -g status-left '#[fg=green]#H #[fg=black]• #[fg=green,bright]#(uname -r | cut -c 1-6)#[default]'
#set -g status-right '#[fg=green,bg=default,bright]#(tmux-mem-cpu-load) #[fg=red,dim,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white,bg=default]%a%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d'
# shell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
# start with window 1 (instead of 0)
set -g base-index 1
# start with pane 1
set -g pane-base-index 1
# screen mode color
set -g default-terminal "screen-256color"
set-option -g default-terminal "screen-256color"
set-window-option -g xterm-keys on
# scrollback buffer n lines
set -g history-limit 15000
# activate history (copy mode)
bind -n M-l copy-mode
# Clear history
###bind-key -n M-L clearhist
# reload config
bind -n M-r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# allow terminal scrolling
# set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Allows for faster key repetition
set -s escape-time 0
# don't wait for repeated commands
set -g repeat-time 0
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Allows us to use C-a a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
# Vi copypaste mode
set-window-option -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
#bind-key -t vi-copy 'v' begin-selection
#bind-key -t vi-copy 'y' copy-selection
# hjkl pane traversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Ctrl+arrow pane traversal
bind -n C-Left select-pane -L
bind -n C-Down select-pane -D
bind -n C-Up select-pane -U
bind -n C-Right select-pane -R
# Ctrl+arrow window traversal
bind -n C-M-Left selectw -p
bind -n C-M-Right selectw -n
bind -n C-M-Down selectw -l
## set to main-horizontal, 66% height for main pane
#bind m run-shell "~/.tmux/scripts/resize-adaptable.sh -l main-horizontal -p 66"
## Same thing for verical layouts
#bind M run-shell "~/.tmux/scripts/resize-adaptable.sh -l main-vertical -p 50"
# automagically rename windows depending on what's running
set-window-option -g automatic-rename
set -g automatic-rename on
# mouse enabled (but this will prevent you to use the mouse in vim)
set -g mouse off
# Some nifty key bindings
#bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'"
#bind-key -n M-h command-prompt -p remote_host: "new-window -n %1 'ssh %1'; split-window -h 'ssh %1'; last-pane; split-window 'ssh root@%1'"
bind -n M-s command-prompt -p remote_host: "new-window -n %1 'ssh %1'; split-window 'ssh %1'; split-window -h 'ssh root@%1'"
# bind-key | split-window -h
# bind-key - split-window -v
# colon :
bind : command-prompt
# scripting
#bind A source-file ~/.tmux/a4toner
#bind G source-file ~/.tmux/guinama
# tmux-zoom.sh
#bind C-z run "~/.tmux/tmux-zoom.sh"
####### COLOR #######
#set -g @colors-solarized '256'
#set -g @colors-solarized 'dark'
#set -g @colors-solarized 'light'
####### RESURRECT #######
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-vim 'session'
# # List of plugins
# set -g @plugin 'tmux-plugins/tpm'
# # set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'seebi/tmux-colors-solarized'
# set -g @plugin 'tmux-plugins/tmux-yank'
# set -g @plugin 'tmux-plugins/tmux-copycat'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
#######
####### # Other examples:
####### # set -g @plugin 'github_username/plugin_name'
####### # set -g @plugin '[email protected]/user/plugin'
####### # set -g @plugin '[email protected]/user/plugin'
#######
# # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# run '~/.tmux/plugins/tpm/tpm'
#######
#######
####### ####### COLOUR (Solarized 256) #######
####### # default statusbar colors
####### set-option -g status-bg colour235 #base02
####### set-option -g status-fg colour136 #yellow
####### set-option -g status-attr default
####### #set-option -g status-attr bright
#######
####### # default window title colors
####### set-window-option -g window-status-fg colour244 #base0
####### set-window-option -g window-status-bg default
####### #set-window-option -g window-status-attr dim
#######
####### # active window title colors
####### set-window-option -g window-status-current-fg colour166 #orange
####### set-window-option -g window-status-current-bg default
####### #set-window-option -g window-status-current-attr bright
#######
####### # pane border
####### set-option -g pane-border-fg colour235 #base02
####### set-option -g pane-active-border-fg colour240 #base01
#######
####### # message text
####### set-option -g message-bg colour235 #base02
####### set-option -g message-fg colour166 #orange
####### #set-option -g message-bg green
####### #set-option -g message-fg black
#######
####### # 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
#source '/home/bernat/.vim/bundle/powerline/powerline/bindings/tmux/powerline.conf'
#
#
#
#
#
#
# Prefix key
# set -g prefix C-a
# unbind C-b
# bind C-a send-prefix
#
# # Keys
# bind k confirm kill-window
# bind K confirm kill-server
# bind % split-window -h
# bind : split-window -v
# bind < resize-pane -L 1
# bind > resize-pane -R 1
# bind - resize-pane -D 1
# bind + resize-pane -U 1
# bind . command-prompt
# bind a last-window
# bind space command-prompt -p index "select-window"
# bind r source-file ~/.tmux.conf
#
# # Options
# set -g bell-action none
# set -g set-titles on
# set -g set-titles-string "tmux (#I:#W)"
# set -g base-index 1
# set -g status-left ""
# set -g status-left-attr bold
# set -g status-right "tmux"
# set -g pane-active-border-bg black
# set -g pane-active-border-fg black
#
# # Window options
# setw -g monitor-activity off
# setw -g automatic-rename off
#
# # Colors
# setw -g window-status-current-fg colour191
# set -g status-bg default
# set -g status-fg white
# set -g message-bg default
# set -g message-fg colour191