forked from jooray/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
223 lines (170 loc) · 5.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
# tmux settings
# http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/tmux.1#x4f5054494f4e53
# ----------------------------------------------------------------------
# | General Settings |
# ----------------------------------------------------------------------
# Make window index start at 1
set -g base-index 1
# Make pane index start at 1
setw -g pane-base-index 1
# Remove delay when sending commands
# (default is 500 milliseconds)
set -sg escape-time 1
# ----------------------------------------------------------------------
# | Key Mappings |
# ----------------------------------------------------------------------
# Change the key combination for the PREFIX key to `ctrl-a`
set -g prefix C-a
unbind-key C-b
# Make tmux send the PREFIX to an application running
# within tmux simply by pressing PREFIX key twice
bind C-a send-prefix
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Remap the copy & paste keys to work as in vim
unbind [
bind Escape copy-mode
# use P instead of p because of screen compatibility
unbind P
bind P paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# [ PREFIX + - ] Split window horizontally
bind - split-window -v
# [ PREFIX + | ] Split window vertically
bind | split-window -h
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# [ PREFIX + h/j/k/l ] Move from pane to pane
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# [ PREFIX + H/J/K/L ] Resize pane
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# [ PREFIX + r ] Reload tmux config
bind r source-file ~/.tmux.conf \; display 'tmux configs reloaded'
# ----------------------------------------------------------------------
# | Status bar |
# ----------------------------------------------------------------------
# Notified when something happens in one of the other windows
#setw -g monitor-activity on
#set -g visual-activity on
# Periodically refresh the status bar
set -g status-interval 60
# Turn on UTF-8 support
set -g status-utf8 on
# Customize what is displayed
set -g status-justify left
set -g status-left-length 50
set -g status-left " %R | "
# └─ current time
set -g status-right " #S "
# └─ current session name
# ----------------------------------------------------------------------
# | Visual Styling |
# ----------------------------------------------------------------------
# Display things in 256 colors
set -g default-terminal 'screen-256color'
# Solarized theme
#### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244 #base0
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 colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# bell
# compatiblity with older tmux versions
#set-window-option -g window-status-bell-style fg=colour235,bg=colour160 #base02, red
# ----------------------------------------------------------------------
# | Compatiblity with 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
# next ^@ ^N sp n
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window
# title A
unbind A
bind A command-prompt "rename-window %%"
# other ^A
unbind ^A
bind ^A last-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
# 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
# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-
# " windowlist -b
unbind '"'
bind '"' choose-window