-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
184 lines (148 loc) · 4.48 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
# -------------------------------------
# keybinds
# -------------------------------------
set -s escape-time 0
setw -g aggressive-resize on
# First remove *all* keybindings
# unbind-key -a
# List keys
bind-key ? list-keys
# Copy mode
# bind-key [ copy-mode
# Paste buffer
# bind-key ] paste-buffer
# Refresh client
bind-key R refresh-client \; display-message "Refreshed already"
# Start with index 1
set -g base-index 1
setw -g pane-base-index 1
# Set new prefix
set -g prefix `
bind-key ` send-prefix
bind-key -n M-` send-prefix
# Config Reloads
bind r source-file ~/.tmux.conf \; display-message "Config reloaded"
# Mouse mode
set -g status-keys vi
setw -g mode-keys vi
setw -g mouse on
# History limit
#set -g default-terminal screen-256color
set -g history-limit 10000
# Visual alerts on activity
set -g visual-activity on
# Window names
set-window-option -g automatic-rename on
set-option -g set-titles off
# Split window
bind-key b split-window -h
bind-key v split-window -v
# Rotate Window
bind-key -r o rotate-window
# Swap pane
bind-key -r J swap-pane -D
bind-key -r K swap-pane -U
# Use Alt-vim keys without prefix to switch panes
bind-key -n M-h select-pane -L
bind-key -n M-j select-pane -D
bind-key -n M-k select-pane -U
bind-key -n M-l select-pane -R
# Use Alt-arrow keys without prefix key to switch panes
bind-key -n M-Left select-pane -L
bind-key -n M-Right select-pane -R
bind-key -n M-Up select-pane -U
bind-key -n M-Down select-pane -D
# Switch windows
bind-key -n C-M-Left previous-window
bind-key -n C-M-Right next-window
bind-key -r H previous-window
bind-key -r L next-window
bind-key -n M-H previous-window
bind-key -n M-L next-window
# Resize pane with prefix + vim keys (can repeat)
bind-key -r h resize-pane -L 5 \; display-message "Resize left"
bind-key -r j resize-pane -D 5 \; display-message "Resize down"
bind-key -r k resize-pane -U 5 \; display-message "Resize up"
bind-key -r l resize-pane -R 5 \; display-message "Resize right"
# Choose Window
bind-key w choose-window
# New window with number
bind-key 1 new-window -t 1
bind-key 2 new-window -t 2
bind-key 3 new-window -t 3
bind-key 4 new-window -t 4
bind-key 5 new-window -t 5
bind-key 6 new-window -t 6
bind-key 7 new-window -t 7
bind-key 8 new-window -t 8
bind-key 9 new-window -t 9
bind-key 0 new-window -t 10
# Switch windows alt+number
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5
bind-key -n M-6 select-window -t 6
bind-key -n M-7 select-window -t 7
bind-key -n M-8 select-window -t 8
bind-key -n M-9 select-window -t 9
bind-key -n M-0 select-window -t 10
# Change current pane to next window
bind-key ! join-pane -t :1
bind-key @ join-pane -t :2
bind-key '#' join-pane -t :3
bind-key '$' join-pane -t :4
bind-key '%' join-pane -t :5
bind-key '^' join-pane -t :6
bind-key '&' join-pane -t :7
bind-key '*' join-pane -t :8
bind-key '(' join-pane -t :9
bind-key ')' join-pane -t :10
# Kill Selected Pane
bind-key q kill-pane
bind-key Q kill-window
# -------------------------------------
# theme
# -------------------------------------
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
# modes
setw -g clock-mode-colour colour5
setw -g mode-attr bold
setw -g mode-fg colour1
setw -g mode-bg colour18
# panes
set -g pane-border-bg colour0
set -g pane-border-fg colour19
set -g pane-active-border-bg colour0
set -g pane-active-border-fg colour9
# statusbar
set -g status-position top
set -g status-justify left
set -g status-bg colour18
set -g status-fg colour137
set -g status-attr dim
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour19,bold] %d/%m #[fg=colour233,bg=colour8,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-fg colour1
setw -g window-status-current-bg colour19
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-fg colour9
setw -g window-status-bg colour18
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour255
setw -g window-status-bell-bg colour1
# messages
set -g message-attr bold
set -g message-fg colour232
set -g message-bg colour16