-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
190 lines (147 loc) · 6.05 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
# Global settings {{{
if-shell "type /usr/local/bin/fish" \
'set-option -g default-shell /usr/local/bin/fish'
if-shell "type /usr/bin/fish" \
'set-option -g default-shell /usr/bin/fish'
set -sg escape-time 10
set -g default-terminal "tmux"
set -ga terminal-overrides ",xterm-256color:Tc,screen-256color:Tc"
set -g history-limit 5000
set -g renumber-windows on
set -g set-titles on
set -g set-titles-string "#S:#I:#W - \"#T\" #{session_alerts}"
set -g status-style fg=colour231,bg=colour233
# set -g status-utf8 on
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
set -g visual-activity on
set -g visual-bell on
set -g visual-silence on
#
# start numbering from 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
# }}}
# Bindings {{{
unbind C-b
set -g prefix M-'\'
bind M-'\' send-prefix
# Use alt-<num> to directly select a window
bind-key -n M-1 select-window -t:1
bind-key -n M-2 select-window -t:2
bind-key -n M-3 select-window -t:3
bind-key -n M-4 select-window -t:4
bind-key -n M-5 select-window -t:5
bind-key -n M-6 select-window -t:6
bind-key -n M-7 select-window -t:7
bind-key -n M-8 select-window -t:8
bind-key -n M-9 select-window -t:9
# Move windows left/right with ctrl+shift+arrow
bind-key -n M-Left swap-window -t:-1\; select-window -t:-1
bind-key -n M-Right swap-window -t:+1\; select-window -t:+1
# don't rename windows automatically
set-option -g allow-rename off
# reload source with alt-\ R
bind-key -T prefix R source-file $HOME/.tmux.conf\; display-message "~/.tmux.conf is reloaded"
# vim copy mode
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
# bind -t vi-copy y copy-pipe "xclip -sel clip -i"
# move X clipboard into tmux paste buffer
bind C-p run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
# move tmux copy buffer into X clipboard
bind C-y run "tmux save-buffer - | xclip -i"
#
# scroll with the mouse whell
bind -n WheelUpPane copy-mode
# renumber windows with c-\ R
bind R \
move-window -r\; \
display-message "Windows reordered..."
# Some useful default mappings:
# alt+\ s: switch between tmux sessions
# }}}
# 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 on
set -g status-justify left
set -g status-style bg=default,fg=colour12
set -g status-interval 2
set -g status-keys vi
# set -g status-left "#{?client_prefix,#[fg=colour237]#[bg=colour110]#[bold]#[noitalics]#[nounderscore],#[fg=colour110]#[bg=colour237]#[bold]#[noitalics]#[nounderscore]} #S "
set -g status-left-length 20
set -g status-left-style default
set -g status-position bottom
# messaging
set -g message-style fg=black,bg=yellow
set -g message-command-style fg=blue,bg=black
#window mode
setw -g mode-style bg=colour6,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,fg=colour11,dim
setw -g window-status-style bg=green,fg=black,reverse
# 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 fg=colour196,bg=colour238,bold
# }}}
#
# The panes {{{
set -g pane-border-style fg=colour238,bg=colour235
set -g pane-active-border-style bg=colour236,fg=colour51
# }}}
# The statusbar {{{
set -g status-position bottom
set -g status-style bg=colour234,fg=colour137,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 "#[fg=colour24,bg=colour235,nobold,noitalics,nounderscore] #[fg=colour152,bg=colour236] #[fg=colour152,bg=colour237] #(whoami)@#(hostname | cut -d. -f1) "
set -g status-right "#[fg=colour24,bg=colour235,nobold,noitalics,nounderscore] #[fg=colour152,bg=colour236] #[fg=colour152,bg=colour237] #S "
set -g status-right-length 50
set -g status-left-length 10
# set -g status-right "#[fg=colour24,bg=colour235,nobold,noitalics,nounderscore] #(~/.tmux/status-uptime.sh) #[fg=colour152,bg=colour236] #(~/.tmux/status-loadavg.sh)#[fg=colour103,bg=colour237] #(~/.tmux/status-time.sh utc) #[fg=colour110,bg=colour236] #(~/.tmux/status-time.sh) #[fg=colour68,bg=colour235] #(whoami)@#(hostname | cut -d. -f1) "
# set -g status-right-length 150
# set -g status-right-style default
# the tab for the current window
setw -g window-status-current-style fg=colour81,bg=colour238,bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
# the tab for all inactive windows
setw -g window-status-style fg=colour138,bg=colour235,none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style fg=colour255,bg=colour1,bold
# }}}
# The messages {{{
set -g message-style fg=colour232,bg=colour166,bold
# }}}
#
# Plugins!!! {{{ P
# Clone the tmux plugin manager: git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'jbnicolai/tmux-fpp'
# 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 @plugin 'ChanderG/tmux-notify'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
#
set -g focus-events off