-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
266 lines (228 loc) · 5.89 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
##################################
#
# Author: Gustavo Yokoyama Ribeiro
# File: .tmux.conf
# Update: 20100908 14:57:13
# (C) Copyright 2010 Gustavo Yokoyama Ribeiro
# Licensed under CreativeCommons Attribution-ShareAlike 3.0 Unsupported
# http://creativecommons.org/licenses/by-sa/3.0/ for more info.
#
##################################
setw -g utf8 on
set -g utf8 on
set -g history-limit 10000
# no login-shell
set -g default-command bash
setw -g aggressive-resize on
set -g default-terminal "screen-256color"
# Terminal emulator window title
set -g set-titles on
#set -g set-titles-string "#T"
set -ga terminal-overrides ",rxvt*:XT"
setw -g allow-rename on
# Automatically set window title
setw -g automatic-rename on
# Notifying if other windows has activities
setw -g monitor-activity on
set -g visual-activity on
set -g bell-action any
set -g bell-on-alert on
set -g visual-bell off
# Highlighting the active window in status bar
#set-window-option -g window-status-current-attr reverse,bold,underscore
#set-window-option -g window-status-current-bg black
#set-window-option -g window-status-current-fg white
setw -g status-bg red
set -g status-keys vi
# Disable status bar by default C-a b to toggle
set -g status off
set -g status-utf8 on
#set -g status-bg white
#set -g status-fg black
set -g status-interval 5
set -g status-left-length 90
set -g status-right-length 60
#set -g status-left "#[fg=cyan]#(whoami)#[fg=black]::#[fg=cyan]#(hostname -s)#[fg=black]::#[fg=cyan]#(curl ipecho.net/plain;echo)"
set -g status-justify left
#set -g status-right '#[fg=Cyan]#S #[fg=black]%a %d %b %R'
# open ssh to somewhere.
bind S command-prompt -p "SSH Target: " "new-window -n %1 'exec ssh %1'"
# reload the config
bind R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded!"
#bind-key o break-pane
#
## Status Bar
#set -g status-bg white
#set -g status-fg black
##set -g status-left '[#H#[default]]'
#set -g status-left '[#S:#I.#P]'
#set -g status-right '[#(cut -d " " -f 1-4 /proc/loadavg)#[default] %Y-%m-%d %H:%M#[default]]'
#
#
#
#set-window-option -g xterm-keys on
#
##set -g status off
#set -g message-fg black
#set -g message-bg red
#set -g display-time 3000
#set -g display-panes-time 3000
##set -g default-command zsh
#set -g default-shell /usr/bin/zsh
#
##set-window-option -g mode-bg white
#
#bind-key -n M-Up up-pane
#bind-key -n M-Down down-pane
#
#bind-key -n M-Left previous-window
#bind-key -n F3 previous-window
#bind-key -n M-Right next-window
#bind-key -n F4 next-window
#
##bind-key \ command-prompt "new-window -n %1 'exec %%'"
#
##bind-key -n F5 new-window -t 10 'exec offlineimap'
##bind-key F5 new-window -t 11 -n mutt 'exec mutt'
##bind-key -n C-F5 find-window mutt
##bind-key F6 new-window -t 12 -n irc 'exec weechat-curses'
##bind-key -n C-F6 find-window irc
##bind-key F7 new-window -t 13 -n cmus 'exec gyr-cmus'
##bind-key -n C-F7 find-window cmus
##new -d -s0
##set -t0 status-bg cyan
##neww -d
##########
#/usr/share/doc/tmux/examples/screen-keys.conf
# Set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix
# Bind appropriate commands similar to screen.
# 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
# title A
unbind A
bind A command-prompt "rename-window %%"
# other ^A
unbind ^A
bind ^A last-window
# next ^@ ^N sp n
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-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
# windows ^W w
#unbind ^W
#bind ^W list-windows
#unbind w
#bind w list-windows
# " windowlist -b
unbind w
bind w choose-window
# quit \
unbind '\'
bind '\' confirm-before "kill-server"
# kill K k
unbind K
bind K confirm-before "kill-window"
#unbind k
#bind k confirm-before "kill-window"
# redisplay ^L l
unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client
## split -v |
#unbind |
#bind | split-window
# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-
##########
#/usr/share/doc/tmux/examples/vim-keys.conf
# 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 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
# toggle statu bar
unbind b
bind b set-option -g status
# the active pane is toggled between zoomed (occupying the whole of the window) and unzoomed
unbind z
bind z resize-pane -Z
bind F1 set-window-option synchronize-panes
# 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
bind < resize-pane -L 1
bind > resize-pane -R 1
bind - resize-pane -D 1
bind + resize-pane -U 1
# bind : to command-prompt like vim
# this is the default in tmux already
bind : command-prompt
# vi-style controls for copy mode
setw -g mode-keys vi
##########
# Copy mode
unbind-key [
bind Escape copy-mode
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy V rectangle-toggle
unbind p
bind p paste-buffer
# buffer
bind F2 choose-buffer
##CLIPBOARD selection integration
##Requires prefix key before the command key
#Copy tmux paste buffer to CLIPBOARD
#bind C-c run "tmux show-buffer | xclip -i -selection clipboard"
#or
#bind C-c run "tmux save-buffer | xclip -i -selection clipboard"
#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
bind C-p run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
#plugins
run-shell ~/work/repos/tmux-resurrect/resurrect.tmux
set -g @resurrect-strategy-vim 'session'