-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdot.tmux.conf
More file actions
186 lines (171 loc) · 6.7 KB
/
dot.tmux.conf
File metadata and controls
186 lines (171 loc) · 6.7 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
##
## dotfiles -- Essential Unix Dot-Files
## Copyright (c) 1995-2026 Dr. Ralf S. Engelschall <rse@engelschall.com>
## Distributed under MIT <https://opensource.org/licenses/MIT> license.
##
## ~/.tmux.conf: tmux(1) configuration
##
# switch prefix key to CTRL+a like screen(1)
unbind-key C-b
set-option -g prefix C-a
bind-key a send-prefix
bind-key C-a last-window
# remove unnecessary key bindings
unbind-key n
unbind-key Space
unbind-key "'"
unbind-key "#"
unbind-key "\$"
unbind-key "&"
unbind-key ","
unbind-key "."
unbind-key ";"
unbind-key "}"
unbind-key "{"
unbind-key "["
unbind-key "]"
unbind-key "!"
unbind-key "/"
unbind-key "="
unbind-key M
unbind-key D
unbind-key L
unbind-key f
unbind-key i
unbind-key l
unbind-key r
unbind-key q
unbind-key t
unbind-key "\~"
unbind-key DC
unbind-key PPage
unbind-key M-1
unbind-key M-2
unbind-key M-3
unbind-key M-4
unbind-key M-5
unbind-key M-6
unbind-key M-7
unbind-key M-n
unbind-key M-o
unbind-key M-p
unbind-key C-o
unbind-key C-Up
unbind-key C-Down
unbind-key C-Left
unbind-key C-Right
unbind-key M-Up
unbind-key M-Down
unbind-key M-Left
unbind-key M-Right
unbind-key S-Up
unbind-key S-Down
# configure special pane handling
unbind-key %
unbind-key '"'
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
bind-key Left select-pane -L
bind-key Right select-pane -R
bind-key Up select-pane -U
bind-key Down select-pane -D
bind-key z resize-pane -Z
bind-key x confirm-before -p "kill pane ? (y/n)" kill-pane
bind-key o rotate-window
bind-key s set-window-option -g synchronize-panes
bind-key "#" next-layout
bind-key e select-layout -E
bind-key t select-layout tiled
# configure window and session renaming
bind-key r command-prompt -I "#W" "rename-window -- '%%'"
bind-key R command-prompt -I "#S" "rename-session -- '%%'"
# configure pane style
set-option -g pane-border-lines single
set-option -g pane-border-indicators arrows
set-option -g pane-border-style "fg=default"
set-option -g pane-active-border-style "fg=red"
set-option -g pane-border-format "─◀#[reverse] #{?pane_active,●,○} #{pane_index} #{pane_current_command} #[noreverse]▶"
set-option -g pane-border-status off
set-hook -g pane-exited 'if -F "#{!=:#{window_panes},1}" "set-option -g pane-border-status top" "set-option -g pane-border-status off"'
set-hook -g after-split-window 'if -F "#{!=:#{window_panes},1}" "set-option -g pane-border-status top" "set-option -g pane-border-status off"'
# configure popup style
set-option -g popup-border-style "fg=blue"
set-option -g popup-border-lines rounded
# disable mouse handling
set-option -g mouse off
bind-key m {
set-option -g mouse
display "mouse support #{?mouse,on,off}"
}
# configure special window handling
bind-key c new-window -c "#{pane_current_path}" -a -t "{next}"
bind-key Tab choose-tree -Z -F "#{?session_format,session: ⚑ #[bold]#{session_name}#[nobold] (#{session_attached} clients) (#{session_windows} windows)#{?session_grouped, (#{session_group} group),}#{?session_active, [active],}#{?session_dead, [dead],},#{?window_format,window: ○ #{window_index} #[bold]#{window_name}#[nobold] (#{window_panes} panes)#{?window_active, [active],} <#{window_width}x#{window_height}>,pane: ⊞ #{pane_index} #[bold]#{pane_current_command}#[nobold]#{?pane_active, [active],}#{?pane_dead, [dead],} <#{pane_width}x#{pane_height}>}}"
bind-key k confirm-before -p "kill window? (y/n)" kill-window
bind-key -r "<" swap-window -t -1 \; select-window -t -1
bind-key -r ">" swap-window -t +1 \; select-window -t +1
bind-key -r Space select-window -n
bind-key -r BSpace select-window -p
# window observation
set-option -g monitor-bell off
set-option -g monitor-activity off
set-option -g monitor-silence 0
set-option -g bell-action any
set-option -g activity-action other
set-option -g silence-action other
set-option -g visual-bell on
set-option -g visual-activity off
set-option -g visual-silence off
bind-key "!" {
set-option -w monitor-bell
display "window BELL monitoring: #{?monitor-bell,on,off}"
}
bind-key "," {
set-option -w monitor-activity
display "window ACTIVITY monitoring: #{?monitor-activity,on,off}"
}
bind-key "." {
if -F "#{==:#{monitor-silence},0}" "set-option -w monitor-silence 10" "set-option -w monitor-silence 0"
display "window SILENCE monitoring: #{?monitor-silence,on,off}"
}
# configure session handling
set-hook -g session-created 'if -F "#{==:#{session_name},0}" "rename-session default"'
bind-key d detach-client
# configure copy buffer
set-option -g -w mode-keys vi
bind-key PageUp copy-mode -e -u
bind-key PageDown copy-mode -e -d
bind-key v copy-mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi V send-keys -X start-of-line \; send-keys -X begin-selection \; send-keys -X end-of-line
bind-key -T copy-mode-vi C-v send-keys -X begin-selection \; send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key -T copy-mode-vi Enter send-keys -X copy-selection-and-cancel
bind-key -T copy-mode-vi Space send-keys -X clear-selection
bind-key -T copy-mode-vi Escape send-keys -X cancel
bind-key p paste-buffer
bind-key P choose-buffer -O time
set-option -g mode-style fg=blue,reverse
# general options
set-option -g history-limit 10000
set-option -g display-panes-time 2000
set-option -g display-time 4000
set-option -g base-index 1
set-option -g focus-events on
set-option -g -s escape-time 50
# status bar providing window and pane information
set-option -g status-keys emacs
set-option -g status-style fg=default,bg=default,reverse
set-option -g status-justify right
set-option -g status-left " #[fg=blue] ※ #(echo $LOGNAME) #[fg=default] #{?session_attached,#[fg=red] ⚑ #{session_name} #[fg=default],}"
set-option -g status-left-length 30
set-option -g status-right ""
set-option -g status-right-length 90
set-option -g window-status-format " #{?window_bell_flag,⦹,#{?window_activity_flag,⚇,#{?window_silence_flag,⦷,#{?#{==:#{window_flags},-},⦿,○}}}} #I#{?#{>:#{window_panes},1}, ⊞ #{window_panes},} #W "
set-option -g window-status-current-format " ● #I#{?#{>:#{window_panes},1}, ⊞ #{window_panes},} #W "
set-option -g window-status-style ""
set-option -g window-status-current-style fg=red
set-option -g window-status-bell-style fg=blue
set-option -g window-status-activity-style fg=blue
set-option -g message-style fg=blue,reverse
# include optional local configurations
source-file -q ~/.dotfiles/tmux.conf