-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
185 lines (154 loc) · 4.24 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
# Options {{{
set -g default-terminal "screen-256color"
if 'infocmp -x tmux-256color > /dev/null 2>&1' 'set -g default-terminal "tmux-256color"'
set-option -ga terminal-overrides ",tmux-256color:Tc"
set -as terminal-features ",gnome*:RGB"
set -sg escape-time 0
set -sg repeat-time 600
set -sg focus-events on
set -g bell-action any
#set -g bell-on-alert on
set -g display-panes-time 3000
set -g display-time 3000
set -g history-limit 50000
set -g base-index 1
set -wg pane-base-index 1
set -g mouse off
set -g status-keys emacs
set -wg mode-keys vi
set -g visual-activity off
set -g visual-bell off
set -g visual-silence off
set -wg automatic-rename off
set -wg clock-mode-style 24
set -wg monitor-activity on
set -g status on
set -g status-interval 2
set -g status-justify left
set -g status-left-length 20
set -g status-position bottom
set -g status-right-length 40
# }}}
# Keybindings {{{
# Change prefix.
set -g prefix C-h
bind C-h send-prefix
unbind C-b
# Unbind stuff I don't use.
unbind '"' # split-window -v
unbind \# # list-buffers
unbind '$' # command-prompt -I #S "rename-session '%%'"
unbind % # split-window -h
unbind & # confirm-before -p "kill-window #W? (y/n)" kill-window
unbind "'" # command-prompt -p index "select-window -t ':%%'"
unbind ( # switch-client -p
unbind ) # switch-client -n
unbind , #
unbind - # delete-buffer
unbind . #
# unbind : # command-prompt
unbind \; #
unbind = # choose-buffer
unbind D #
unbind L #
unbind [ # copy-mode
unbind ] # paste-buffer
# unbind c #
unbind d # detach-client
unbind f # command-prompt "find-window '%%'"
unbind i #
unbind l # last-window
unbind n # next-window
unbind o # rotate-window -U
unbind p # previous-window
unbind q # display-panes
unbind r # refresh-client
unbind s #
# unbind t # clock-mode
# unbind w #
unbind x #
unbind z # resize-pane -Z
# unbind { #
# unbind } #
# unbind ~ # show-messages
unbind Up
unbind Down
unbind Left
unbind Right
# unbind M-1
# unbind M-2
# unbind M-3
# unbind M-4
# unbind M-5
# unbind Space
unbind M-n # next-window -a
unbind M-o # rotate-window -D
unbind M-p # previous-window -a
unbind C-Up
unbind C-Down
unbind C-Left
unbind C-Right
unbind M-Up
unbind M-Down
unbind M-Left
unbind M-Right
# Quick reload of config file.
bind F12 source-file ~/.tmux.conf \; display "Reloaded tmux.conf"
bind \; command-prompt
bind D detach-client
# Sessions
bind C new-session \; command-prompt "rename-session '%%'"
bind S command-prompt "rename-session '%%'"
bind C-s choose-session
# Windows
bind c new-window -c "#{pane_current_path}" \; command-prompt "rename-window '%%'"
bind W command-prompt "rename-window '%%'"
bind C-w choose-window
bind m command-prompt "move-window -t '%%'"
bind / command-prompt "find-window '%%'"
bind C-^ last-window
bind u next-window -a
bind 0 select-window -t 0
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 9
# Panes
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
bind C-p display-panes
bind C-h select-pane -L
bind C-j select-pane -D
bind C-k select-pane -U
bind C-l select-pane -R
bind -r C-w select-pane -t :.+
bind -r H resize-pane -L 1
bind -r J resize-pane -D 1
bind -r K resize-pane -U 1
bind -r L resize-pane -R 1
bind Z resize-pane -Z
# Copy mode
bind y copy-mode
bind p paste-buffer
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe "xsel --input --clipboard"
# Other
bind M-b set -w monitor-activity \; display "toggled monitor-activity"
bind M-m set -g mouse \; display "toggled mouse"
# }}}
# Theme {{{
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=black,bg=colour3] #S:#I.#P '
# set -g status-right '#[fg=colour16,bold] #h #[fg=colour245] #(cat /proc/loadavg | cut -d" " -f-3) #[fg=white]%d %b %R '
set -g status-right ' #[fg=white]%R '
set -g window-status-format "#[fg=white,bg=black] #I.#W#F "
set -g window-status-current-format "#[fg=colour16,bg=colour39,noreverse,bold] #I.#W#F "
set -g window-style 'fg=colour247,bg=colour239'
set -g window-active-style 'fg=white,bg=colour233'
# }}}