-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
221 lines (179 loc) · 3.78 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
### General options ###
# set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix
# history
set -g history-limit 10000
# mouse support
set -g mode-mouse on
set -g mouse-select-window on
set -g mouse-select-pane on
set -g mouse-resize-pane on
# copy mode colours
set -g mode-bg white
set -g mode-fg black
### Screen-like keybindings ###
# lockscreen ^X x
unbind ^X
bind ^X lock-server
unbind x
bind x lock-server
# screen ^C c
unbind ^C
bind ^C new-window
unbind c
bind c new-window
# detach ^D d
unbind ^D
bind ^D detach
# displays *
unbind *
bind * list-clients
# next ^@ ^N sp n
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window
# title A
unbind A
bind A command-prompt "rename-window %%"
# other ^A
unbind ^A
bind ^A last-window
# prev ^H ^P p ^?
unbind ^H
bind ^H previous-window
unbind ^P
bind ^P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window
unbind ^BSpace
bind ^BSPace previous-window
# next-layout ^N n
unbind ^N
bind ^N next-layout
unbind n
bind n next-layout
# previous-layout ^P p
unbind ^P
bind ^p previous-layout
unbind p
bind p previous-layout
# windows ^W w
unbind ^W
bind ^W list-windows
unbind w
bind w list-windows
# quit \
unbind '\'
bind '\' confirm-before "kill-session"
# kill window K k
unbind K
bind K confirm-before "kill-window"
unbind k
bind k confirm-before "kill-window"
# kill pane X
unbind X
bind X confirm-before "kill-pane"
# redisplay ^L l
unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client
# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-
# " windowlist -b
unbind '"'
bind '"' choose-window
# copy mode Escape
unbind Escape
bind Escape copy-mode
### Vim-like keybindings ###
# vi-style controls
set -g status-key vi
setw -g mode-keys vi
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
unbind s
bind s split-window -v
unbind S
bind S split-window -v
unbind v
bind v split-window -h
unbind V
bind V split-window -h
# move around panes with hjkl, as one would in vim after pressing ctrl-w
unbind h
bind h select-pane -L
unbind j
bind j select-pane -D
unbind k
bind k select-pane -U
unbind l
bind l select-pane -R
# resize panes like vim
# feel free to change the "1" to however many lines you want to resize by, only
# one at a time can be slow
unbind <
bind < resize-pane -L 20
unbind >
bind > resize-pane -R 20
unbind -
bind - resize-pane -D 10
unbind +
bind + resize-pane -U 10
# bind : to command-prompt like vim
# this is the default in tmux already
unbind :
bind : command-prompt
# vim keys in copy mode
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy Escape cancel
unbind p
bind p paste-buffer
# copy buffer to system clipboard
unbind y
bind y run "tmux show-buffer | xsel -i"
### Status bar ###
# UTF-8 support
set -g status-utf8 on
# windows justification
set -g status-justify left
# status line
set -g status-left-length 50
set -g status-left " #[fg=red]#H#[default] | #[fg=green]#S#[default] |"
set -g status-left-length 50
set -g status-right "%H:%M | %d/%m/%y "
# default statusbar colors
set -g status-fg default
set -g status-bg black
set -g status-attr bright
# default window title colors
setw -g window-status-fg default
setw -g window-status-bg default
setw -g window-status-attr bright
# active window title colors
setw -g window-status-current-fg blue
setw -g window-status-current-bg default
setw -g window-status-current-attr bright
# command/message line colors
set -g message-fg default
set -g message-bg black
set -g message-attr bright
#### Panes ###
# colours
set -g pane-border-fg black
set -g pane-border-bg default
set -g pane-active-border-fg default
set -g pane-active-border-bg default