-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
224 lines (205 loc) · 8.36 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
# vim: set ft=tmux :
set-option -g default-terminal screen #-256color
set-option -g base-index 1
set-option -g display-time 1000
set-option -g history-limit 10000
set-option -g prefix C-t
set-option -g status-attr bold
set-option -g status-bg '#444444'
set-option -g status-fg '#f6f3e8'
set-option -g status-right ""
set-option -g set-titles on
set-option -g set-titles-string "#T @ #H"
set-option -g renumber-windows on
set-option -g escape-time 1
set-window-option -g automatic-rename on
set-window-option -g mode-keys vi
set-window-option -g mouse on
# set-window-option -g utf8 on
# set-option -g status-utf8 on
# set-window-option -g mouse-utf8 on
unbind-key C-b
bind-key c new-window -c "#{pane_current_path}"
bind-key C-r source-file ~/.tmux.conf
bind-key -r h select-pane -L
bind-key -r j select-pane -D
bind-key -r k select-pane -U
bind-key -r l select-pane -R
bind-key -r H resize-pane -L 1
bind-key -r J resize-pane -D 1
bind-key -r K resize-pane -U 1
bind-key -r L resize-pane -R 1
bind-key C-z send-prefix
bind-key s split-window -vc "#{pane_current_path}"
bind-key S choose-session
bind-key v split-window -hc "#{pane_current_path}"
bind-key C-[ copy-mode
bind-key C-] paste-buffer
bind-key b split-window "tmux lsw | percol --initial-index $(tmux lsw | awk '/active.$/ {print NR-1}') | cut -d':' -f 1 | xargs tmux select-window -t"
bind-key B split-window "tmux ls | percol --initial-index $(tmux ls | awk '/attached.$/ {print NR-1}') | cut -d':' -f 1 | xargs tmux switch-client -t"
bind-key C-c run "tmux save-buffer - | xclip -i"
bind-key C-v run "xclip -o | tmux load-buffer - && tmux paste-buffer"
bind-key C-t display-panes
# Misc
if "which acpi" "set -g status-right '%m-%d %H:%M #(~/script/tmux/status-bar/battery)#[default]'"
if "test -d ~/repos/tmux-scroll-copy-mode" "run-shell ~/repos/tmux-scroll-copy-mode"
########################################
# list-keys
#
# bind-key C-o rotate-window
# bind-key C-z send-prefix
# bind-key Space next-layout
# bind-key ! break-pane
# bind-key " split-window
# bind-key # list-buffers
# bind-key $ command-prompt -I #S "rename-session '%%'"
# bind-key % split-window -h
# bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window
# bind-key ' command-prompt -p index "select-window -t ':%%'"
# bind-key ( switch-client -p
# bind-key ) switch-client -n
# bind-key , command-prompt -I #W "rename-window '%%'"
# bind-key - delete-buffer
# bind-key . command-prompt "move-window -t '%%'"
# bind-key 0 select-window -t :0
# bind-key 0 select-window -t :0
# bind-key 1 select-window -t :1
# bind-key 2 select-window -t :2
# bind-key 3 select-window -t :3
# bind-key 4 select-window -t :4
# bind-key 5 select-window -t :5
# bind-key 6 select-window -t :6
# bind-key 7 select-window -t :7
# bind-key 8 select-window -t :8
# bind-key 9 select-window -t :9
# bind-key : command-prompt
# bind-key ; last-pane
# bind-key = choose-buffer
# bind-key ? list-keys
# bind-key D choose-client
# bind-key L switch-client -l
# bind-key [ copy-mode
# bind-key ] paste-buffer
# bind-key c new-window
# bind-key d detach-client
# bind-key f command-prompt "find-window '%%'"
# bind-key i display-message
# bind-key l last-window
# bind-key n next-window
# bind-key o select-pane -t :.+
# bind-key p previous-window
# bind-key q display-panes
# bind-key r refresh-client
# bind-key s choose-session
# bind-key t clock-mode
# bind-key v split-window
# bind-key w choose-window
# bind-key x confirm-before -p "kill-pane #P? (y/n)" kill-pane
# bind-key { swap-pane -U
# bind-key } swap-pane -D
# bind-key ~ show-messages
# bind-key PPage copy-mode -u
# bind-key -r Up select-pane -U
# bind-key -r Down select-pane -D
# bind-key -r Left select-pane -L
# bind-key -r Right select-pane -R
# bind-key M-1 select-layout even-horizontal
# bind-key M-2 select-layout even-vertical
# bind-key M-3 select-layout main-horizontal
# bind-key M-4 select-layout main-vertical
# bind-key M-5 select-layout tiled
# bind-key M-n next-window -a
# bind-key M-o rotate-window -D
# bind-key M-p previous-window -a
# bind-key -r M-Up resize-pane -U 5
# bind-key -r M-Down resize-pane -D 5
# bind-key -r M-Left resize-pane -L 5
# bind-key -r M-Right resize-pane -R 5
# bind-key -r C-Up resize-pane -U
# bind-key -r C-Down resize-pane -D
# bind-key -r C-Left resize-pane -L
# bind-key -r C-Right resize-pane -R
########################################
# list-commands
#
# attach-session [-dr] [-t target-session]
# bind-key [-cnr] [-t key-table] key command [arguments]
# break-pane [-d] [-t target-pane]
# capture-pane [-b buffer-index] [-E end-line] [-S start-line] [-t target-pane]
# choose-buffer [-t target-window] [template]
# choose-client [-t target-window] [template]
# choose-session [-t target-window] [template]
# choose-window [-t target-window] [template]
# clear-history [-t target-pane]
# clock-mode [-t target-pane]
# command-prompt [-I inputs] [-p prompts] [-t target-client] [template]
# confirm-before [-p prompt] [-t target-client] command
# copy-mode [-u] [-t target-pane]
# delete-buffer [-b buffer-index]
# detach-client [-P] [-s target-session] [-t target-client]
# display-message [-p] [-c target-client] [-t target-pane] [message]
# display-panes [-t target-client]
# find-window [-t target-window] match-string
# has-session [-t target-session]
# if-shell shell-command command [command]
# join-pane [-dhv] [-p percentage|-l size] [-s src-pane] [-t dst-pane]
# kill-pane [-a] [-t target-pane]
# kill-server
# kill-session [-t target-session]
# list-buffers
# list-clients [-F format] [-t target-session]
# list-commands
# list-keys [-t key-table]
# list-panes [-as] [-F format] [-t target]
# list-sessions [-F format]
# list-windows [-a] [-F format] [-t target-session]
# load-buffer [-b buffer-index] path
# lock-client [-t target-client]
# lock-server
# lock-session [-t target-session]
# move-window [-dk] [-s src-window] [-t dst-window]
# new-session [-d] [-n window-name] [-s session-name] [-t target-ses
# sion] [-x width] [-y height] [command]
# new-window [-adk] [-n window-name] [-t target-window] [command]
# next-layout [-t target-window]
# next-window [-a] [-t target-session]
# paste-buffer [-dr] [-s separator] [-b buffer-index] [-t target-pan
# e]
# pipe-pane [-o] [-t target-pane] [command]
# previous-layout [-t target-window]
# previous-window [-a] [-t target-session]
# refresh-client [-S] [-t target-client]
# rename-session [-t target-session] new-name
# rename-window [-t target-window] new-name
# resize-pane [-DLRU] [-t target-pane] [adjustment]
# respawn-pane [-k] [-t target-pane] [command]
# respawn-window [-k] [-t target-window] [command]
# rotate-window [-DU] [-t target-window]
# run-shell command
# save-buffer [-a] [-b buffer-index]
# select-layout [-np] [-t target-window] [layout-name]
# select-pane [-lDLRU] [-t target-pane]
# select-window [-lnp] [-t target-window]
# send-keys [-R] [-t target-pane] key ...
# send-prefix [-2] [-t target-pane]
# server-info
# set-buffer [-b buffer-index] data
# set-environment [-gru] [-t target-session] name [value]
# set-option [-agsuw] [-t target-session|target-window] option [valu
# e]
# set-window-option [-agu] [-t target-window] option [value]
# show-buffer [-b buffer-index]
# show-environment [-g] [-t target-session]
# show-messages [-t target-client]
# show-options [-gsw] [-t target-session|target-window]
# show-window-options [-g] [-t target-window]
# source-file path
# split-window [-dhvP] [-p percentage|-l size] [-t target-pane] [com
# mand]
# start-server
# suspend-client [-t target-client]
# swap-pane [-dDU] [-s src-pane] [-t dst-pane]
# swap-window [-d] [-s src-window] [-t dst-window]
# switch-client [-lnpr] [-c target-client] [-t target-session]
# unbind-key [-acn] [-t key-table] key
# unlink-window [-k] [-t target-window]