-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
152 lines (143 loc) · 7.29 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
set -s default-terminal "tmux-256color"
set -s escape-time 10
set -s extended-keys on
set -s focus-events on
set -g assume-paste-time 10
set -g base-index 1
set -g display-panes-active-colour "colour203"
set -g display-panes-colour "colour111"
set -g display-time 0
set -g history-limit 100000
set -g message-command-style "fg=colour252,bg=colour238"
set -g message-style "fg=colour252,bg=colour238"
set -g mouse on
set -g prefix C-j
set -g renumber-windows on
set -g repeat-time 1000
set -g set-titles on
set -g set-titles-string "#{pane_current_command} - tmux(#{session_name})"
set -g status-keys emacs
set -g update-environment "COLORTERM DISPLAY SSH_AGENT_PID SSH_ASKPATH SSH_AUTH_SOCK SSH_CLIENT SSH_CONNECTION SSH_TTY VIM_TERMINAL WINDOWID XAUTHORITY"
set -wg aggressive-resize on
set -wg automatic-rename-format "#{?pane_in_mode,[tmux],#{pane_current_command}}"
set -wg copy-mode-current-match-style "fg=colour235,bg=colour207"
set -wg copy-mode-mark-style "fg=colour235,bg=colour203"
set -wg copy-mode-match-style "fg=colour235,bg=colour117"
set -wg main-pane-height "50%"
set -wg main-pane-width "50%"
set -wg mode-keys vi
set -wg mode-style "fg=colour235,bg=colour227"
set -wg pane-active-border-style "fg=colour117"
set -wg pane-base-index 1
set -wg pane-border-style "fg=colour238"
set -g status on
set -g status-format[0] "#[align=left range=left #{status-left-style}]#[push-default]#{T:status-left}#[pop-default]#[norange default] #[list=on]#[list=left-marker]<#[list=right-marker]>#[list=on]#{W:#[range=window|#{window_index} default #{window-status-style}]#[push-default]#{T:window-status-format}#[pop-default]#[norange]#{?window_end_flag,,#{E:window-status-separator}},#[list=focus range=window|#{window_index} default #{window-status-current-style}]#[push-default]#{T:window-status-current-format}#[pop-default]#[list=on norange]#{?window_end_flag,,#{E:window-status-separator}}}#[align=right nolist range=right default] #[#{status-right-style}]#[push-default]#{T:status-right}#[pop-default]"
set -g status-interval 5
set -g status-left " #{session_name}#{?#{e|>=:#{client_width},120}, #[fg=colour238]\u2502#[default] #{host},} "
set -g status-left-style "fg=colour235,bg=colour117"
set -g status-right "#[fg=colour252,bg=colour242]#(~/.tmux/sysinfo)#[fg=colour117 reverse]\u258C#[default] #{?#{e|>=:#{client_width},100},%Y-%m-%d ,}%H:%M "
set -g status-right-style "fg=colour235,bg=colour117"
set -g status-style "fg=colour252,bg=colour238"
set -wg window-status-current-format " #{window_index}:#{window_name}#{window_flags} "
set -wg window-status-current-style "fg=colour235,bg=colour156"
set -wg window-status-format " #{window_index}:#{window_name}#{window_flags} "
set -wg window-status-separator "#{?#{e|==:#{e|+:#{window_index},1},#{active_window_index}},#[fg=colour242 bg=colour156]\u258C,#{?#{e|==:#{window_index},#{active_window_index}},#[fg=colour156 bg=colour242]\u258C,#[fg=colour238]\u2502}}"
set -wg window-status-style "fg=colour252,bg=colour242"
unbind -a -T prefix
bind C-h clear-history
bind C-j send-prefix
bind C-l refresh-client
bind '$' command-prompt -I "#{session_name}" { rename-session "%%%" }
bind '&' confirm-before -p "Kill session #{session_id} (#{session_name})?" kill-session
bind ':' command-prompt
bind '?' list-keys
bind d detach-client
bind i display-message "server: tmux #{version} (#{pid}) client: #{client_tty} (#{client_pid}) session: #{session_name} (#{session_id})"
bind r source-file ~/.tmux.conf
bind '~' show-messages
bind -r C-n select-window -t "{next}"
bind -r C-p select-window -t "{previous}"
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 "{end}"
bind -r '<' swap-window -d -t "{previous}"
bind -r '>' swap-window -d -t "{next}"
bind '@' command-prompt -I "#{window_name}" { rename-window "%%%" }
bind C new-window sudo -i
bind X confirm-before -p "Kill window #{window_id} (#{window_name})?" kill-window
bind c new-window
bind w {
set -g -F @session_id "#{session_id}"
choose-tree -Z -w -f "#{==:#{session_id},#{@session_id}}"
}
bind C-o select-pane -Z -t "{last}"
bind Space select-layout -n
bind '!' break-pane -a
bind '"' if -F "#{pane_marked_set}" { join-pane } {
set -g -F @session_id "#{session_id}"
choose-tree -Z -f "#{==:#{session_id},#{@session_id}}" { join-pane -s "%%" }
}
bind '=' select-layout -E
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind M select-pane -M
bind S if -F "#{==:#{pane_start_command},sudo -i}" { split-window -v sudo -i } { split-window -v }
bind -r '[' select-pane -t "{previous}"
bind -r ']' select-pane -t "{next}"
bind e if -F "#{pane_marked_set}" { swap-pane } { display-panes -d 0 { swap-pane -s "%%" } }
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind m select-pane -m
bind q display-panes -d 0
bind s if -F "#{==:#{pane_start_command},sudo -i}" { split-window -h sudo -i } { split-window -h }
bind x confirm-before -p "Kill pane #{pane_id} (#{pane_current_command})?" kill-pane
bind z resize-pane -Z
bind -r C-Up resize-pane -U
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind '#' choose-buffer
bind '-' run 'tmux list-buffers -F "#{buffer_name}" | xargs -r -I{} tmux delete-buffer -b {}'
bind '/' command-prompt -p "(search)" { copy-mode ; send -X search-backward "%%%" }
bind p run '${HOME}/.tmux/executor paste | tmux load-buffer -; tmux paste-buffer -p -r'
bind v copy-mode
bind -T copy-mode-vi C-l send -X refresh-from-pane
bind -T copy-mode-vi C-o send -X copy-pipe '${HOME}/.tmux/executor openbrowser'
bind -T copy-mode-vi C-v send -X rectangle-toggle
bind -T copy-mode-vi C-x send -X copy-pipe '${HOME}/.tmux/executor open #{q:pane_current_path}'
bind -T copy-mode-vi C-p send -X search-backward-text "\u00A0"
bind -T copy-mode-vi C-n send -X search-forward-text "\u00A0"
bind -T copy-mode-vi V send -X select-line
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe '${HOME}/.tmux/executor copy'
unbind -a -T root
bind -T root MouseDown1Pane select-pane -t "{mouse}" \; send-keys -M
bind -T root MouseDown2Pane select-pane -t "{mouse}" \; send-keys -M
bind -T root MouseDown3Pane select-pane -t "{mouse}" \; send-keys -M
bind -T root MouseDown1Status select-window -t "{mouse}"
bind -T root MouseDown2Status select-window -t "{mouse}"
bind -T root MouseDown3Status select-window -t "{mouse}"
bind -T root MouseDrag1Pane if -t "{mouse}" -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { send-keys -M } { copy-mode -M }
bind -T root MouseDrag1Border resize-pane -M
bind -T root WheelUpPane select-pane -t "{mouse}" \; if -F "#{mouse_any_flag}" { send-keys -M } {
if -F "#{pane_in_mode}" { send-keys -M ; send-keys -M ; send-keys -M } {
if -F "#{alternate_on}" { send-keys Up Up Up } { copy-mode -e ; send-keys -M ; send-keys -M ; send-keys -M }
}
}
bind -T root WheelDownPane select-pane -t "{mouse}" \; if -F "#{mouse_any_flag}" { send-keys -M } {
if -F "#{pane_in_mode}" { send-keys -M ; send-keys -M ; send-keys -M } {
if -F "#{alternate_on}" { send-keys Down Down Down }
}
}
bind -T root WheelUpStatus select-window -t "{previous}"
bind -T root WheelDownStatus select-window -t "{next}"