forked from jimlawton/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
232 lines (184 loc) · 6.37 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
# ~/.tmux.conf
###########################################################################
# General options
# Set profix to C-a.
set -g prefix C-b
unbind C-a
# Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-terminal screen-256color
# Ring the bell if any background window rang a bell
set -g bell-action any
# Watch for activity in background windows
setw -g monitor-activity on
set -g visual-activity on
# scrollback size
set -g history-limit 10000
# set first window to index 1 (not 0) to map more to the keyboard layout
set -g base-index 1
setw -g pane-base-index 1
# pass through xterm keys
set -g xterm-keys on
###########################################################################
# General keymap
# Keep your finger on ctrl, or don't, same result
bind-key C-d detach-client
bind-key C-c new-window
bind-key C-p paste-buffer
# Redraw the client (if interrupted by wall, etc)
bind R refresh-client
# reload tmux config
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config.'
# Use emacs keybindings for tmux commandline input.
#set -g status-keys emacs
# Use vi keybindings in copy and choice modes
#setw -g mode-keys vi
###########################################################################
# Window management / navigation
# move between windows
#bind-key C-h previous-window
#bind-key C-l next-window
# C-\ (no prefix) to skip to last window we were in before this one
bind -n "C-\\" last-window
# C-Space (no prefix) to tab to next window
bind -n C-Space next-window
# C-Shift-Left swaps current window with window to the left.
bind-key -n C-S-Left swap-window -t -1
# C-Shift-Right swaps current window with window to the right.
bind-key -n C-S-Right swap-window -t +1
###########################################################################
# Pane management / navigation
# Horizontal splits with s or C-s
#unbind s
#unbind C-s
#bind-key s split-window
#bind-key C-s split-window
bind | split-window -h
# Vertical split with v or C-v
#unbind v
#unbind C-v
#bind-key v split-window -h
#bind-key C-v split-window -h
bind - split-window -v
# navigation with C-{h,j,k,l} -- NO PREFIX
# https://gist.github.com/mislav/5189704
#bind -n C-k run-shell 'tmux-vim-select-pane -U'
#bind -n C-j run-shell 'tmux-vim-select-pane -D'
#bind -n C-h run-shell 'tmux-vim-select-pane -L'
#bind -n C-l run-shell 'tmux-vim-select-pane -R'
# C-b C-k to passthrough a C-k
# C-k is consumed for pane navigation but we want it for kill-to-eol
unbind C-k
bind C-k send-key C-k
# Pane resize in all four directions using vi bindings.
# Can use these raw but I map them to Cmd-Opt-<h,j,k,l> in iTerm2.
# http://tangledhelix.com/blog/2012/04/28/iterm2-keymaps-for-tmux/
# Note on a few prefix options: C-a = 0x01, C-b = 0x02, C-g = 0x06
#bind-key J resize-pane -D
#bind-key K resize-pane -U
#bind-key H resize-pane -L
#bind-key L resize-pane -R
# easily toggle synchronization (mnemonic: e is for echo)
# sends input to all panes in a given window.
#bind e setw synchronize-panes on
#bind E setw synchronize-panes off
###########################################################################
# Scrollback / pastebuffer
# Vim-style copy/paste
#unbind [
#bind y copy-mode
#unbind p
#bind p paste-buffer
#bind -t vi-copy v begin-selection
#bind -t vi-copy y copy-selection
#bind -t vi-copy Escape cancel
###########################################################################
# Mouse mode
#set -g mode-mouse on
#set -g mouse-resize-pane on
#set -g mouse-select-pane on
#set -g mouse-select-window on
# Toggle mouse on
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# Toggle mouse off
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
###########################################################################
# Color scheme (Solarized light)
### default statusbar colors
##set-option -g status-bg colour231 #base2
##set-option -g status-fg colour130 #yellow
##set-option -g status-attr default
##
### default window title colors
##set-window-option -g window-status-fg colour180 #base00
##set-window-option -g window-status-bg default
##
### active window title colors
##set-window-option -g window-status-current-fg colour196 #orange
##set-window-option -g window-status-current-bg default
##
### pane border
##set-option -g pane-active-border-fg black
##set-option -g pane-active-border-bg white
##set-option -g pane-border-fg brightcyan
##set-option -g pane-border-bg default
##
### message text
##set-option -g message-bg colour231 #base2
##set-option -g message-fg colour196 #orange
##
### pane number display
##set-option -g display-panes-active-colour colour20 #blue
##set-option -g display-panes-colour colour196 #orange
##
### clock
##set-window-option -g clock-mode-colour colour40 #green
###########################################################################
# Color scheme (Solarized Dark)
# default statusbar colors
set-option -g status-bg brightgreen
set-option -g status-fg white
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg brightcyan
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg blue
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg brightgreen
set-option -g pane-active-border-fg red
# message text
set-option -g message-bg black
set-option -g message-fg red
# pane number display
set-option -g display-panes-active-colour red
set-option -g display-panes-colour white
# clock
set-window-option -g clock-mode-colour cyan
###########################################################################
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'