-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
/
.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
# --- TMUX.CONF --------------------------------------------------------
#
# Configuration file for tmux (terminal multiplexer)
# Use {screen,vim}-like key-bindings and
#
# ----------------------------------------------------------------------
## PREFIX KEY {{{
## Set the prefix key to Ctrl-Space
set-option -g prefix C-Space
bind-key C-Space send-prefix
## }}}
## STANDARD OPTIONS {{{
## Remove Esc-Wait (makes Vi works)
set-option -sg escape-time 0
## All kind of options
set-option -g history-limit 1024
set-option -g bell-action any
set-option -g default-terminal screen-256color
set-option -g display-panes-colour red
set-option -g message-bg black
set-option -g message-fg white
set-option -g mouse-select-pane off
set-option -g visual-activity off
set-option -g visual-bell off
setw -g aggressive-resize on
## Detach session
bind-key d detach
bind-key C-d detach
## Lock screen
bind-key x lock-server
bind-key C-x lock-server
bind-key -n M-x lock-server
set-option -g lock-after-time 0
set-option -g lock-server on
set-option -g lock-command "vlock"
## }}}
## STATUS BAR {{{
# standard options
set-option -g status on
set-option -g automatic-rename on
set-option -g status-interval 15
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-position bottom
# default statusbar colors
set-option -g status-fg red
set-option -g status-bg default
set-option -g status-attr bright
# default window title colors
set-window-option -g window-status-fg black
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr bright
set-window-option -g window-status-format '❮❮❮'
#set-window-option -g window-status-format ' #W '
# active window title colors
set-window-option -g window-status-current-fg red
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright
#set-window-option -g window-status-current-format ' #W '
set-window-option -g window-status-current-format '❮❮❮'
# default pane border color
set-option -g pane-border-bg default
set-option -g pane-border-fg white
# active pane border color
set-option -g pane-active-border-bg default
set-option -g pane-active-border-fg white
# Left / Right status
set-option -g status-left-length 0 # old: 96
set-option -g status-right-length 96 # old: 96
set-option -g status-left ""
set-option -g status-right "#(~/bin/bar/status.sh -O tmux -F7 -H0 -mbc)"
## }}}
## KEY MAPPING {{{
## Move around windows
unbind-key c ; bind-key c new-window
unbind-key n ; bind-key n next-window
unbind-key p ; bind-key p previous-window
unbind-key C-Left ; bind-key -n C-Left prev
unbind-key C-Right; bind-key -n C-Right next
unbind-key " " ; bind-key " " last-window
## Choose windows
unbind-key w ; bind-key w list-windows
unbind-key * ; bind-key * choose-window
## Prompts
unbind-key : ; bind-key : command-prompt -p "tmux:"
unbind-key g ; bind-key g command-prompt -p "number:" "move-window -t '%%'"
unbind-key m ; bind-key m command-prompt -p "man:" "split-window -h 'man %%'"
unbind-key A ; bind-key A command-prompt -p "rename:" "rename-window %%"
unbind-key K ; bind-key K confirm-before "kill-window"
## Create / Delete panes
# unbind-key | ; bind-key | split-window -h
# unbind-key - ; bind-key - split-window -v
unbind-key | ; bind-key | choose-window "join-pane -h -s %%"
unbind-key - ; bind-key - choose-window "join-pane -v -s %%"
unbind-key o ; bind-key o break-pane
unbind-key r ; bind-key r break-pane -d
## Move around panes
unbind-key %
unbind-key Tab ; bind-key -r Tab select-pane -t:.+
unbind-key BTab ; bind-key -r BTab select-pane -t:.-
unbind-key C-h ; bind-key -r C-h select-pane -L
unbind-key C-j ; bind-key -r C-j select-pane -D
unbind-key C-k ; bind-key -r C-k select-pane -U
unbind-key C-l ; bind-key -r C-l select-pane -R
## Refresh screen
unbind-key ^L ; bind-key ^L refresh-client
## Reload config
unbind-key R ; bind-key R source-file "$HOME/.tmux.conf" \; display-message "Configuration reloaded !"
## Copy-mode
set-window-option -g mode-keys vi
set-window-option -g mode-mouse off
set-option buffer-limit 10
unbind-key C-v ; bind-key C-v copy-mode
unbind-key Escape ; bind-key Escape copy-mode
unbind-key C-NPage ; bind-key -n C-NPage copy-mode
unbind-key C-PPage ; bind-key -n C-PPage copy-mode
unbind-key i ; bind-key i paste-buffer
unbind-key ] ; bind-key ] paste-buffer
unbind-key -t vi-copy v ; bind-key -t vi-copy v begin-selection
unbind-key -t vi-copy y ; bind-key -t vi-copy y copy-selection
unbind-key -t vi-copy Enter ; bind-key -t vi-copy Enter copy-selection
unbind-key -t vi-copy b ; bind-key -t vi-copy b rectangle-toggle
## VIM-LIKE {{{
unbind-key s ; bind-key s split-window -v
unbind-key v ; bind-key v split-window -h
# move around panes with hjkl
unbind-key h ; bind-key h select-pane -L
unbind-key j ; bind-key j select-pane -D
unbind-key k ; bind-key k select-pane -U
unbind-key l ; bind-key l select-pane -R
# swap panes
unbind-key H ; bind-key H swap-pane -s:.-
unbind-key J ; bind-key J swap-pane -Ds:.-
unbind-key K ; bind-key K swap-pane -Us:.+
unbind-key L ; bind-key L swap-pane -s:.+
# reset pane layout
unbind-key = ; bind-key = select-layout main-vertical
## }}}
## }}}
# vim:ft=tmux:foldmethod=marker
#for 256 colors {{{
set -g default-terminal "screen-256color"
# }}}
# Enable mouse control (clickable windows, panes, resizable panes) {{{
setw -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
setw -g mouse-resize-pane on
set -g history-limit 30000
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# }}}
# certain commands added from justin.abrah.ms {{{
set -g base-index 1 #preserves simple left-based ordering for windows.
setw -g aggressive-resize on
set -g history-limit 100000
# }}}