-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
56 lines (41 loc) · 1.74 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
# Located in the vim folder for simplicity of configuring new tmux+vim setups
# put to (or source-file from) ~/.config/tmux/tmux.conf:
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -g history-limit 50000
# fix escape being detected after 500ms
set -sg escape-time 0
# Start window numbering at 1
set -g base-index 1
setw -g pane-base-index 1
# Mouse works as expected
set -g mouse on
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
# rebind prefix to C-a
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
### COLOUR (Solarized dark)
setw -g window-status-style fg=brightblue,bg=default
setw -g window-status-current-style fg=red,bg=default,bright
setw -g window-status-bell-style fg=black,bg=red
set -g status-style bg=default,fg=yellow
set -g message-style fg=brightred,bg=default
set -g status-left-length 40
# clock
setw -g clock-mode-colour green
# Load tmux-resurrect plugin
run-shell ~/.vim/tmux-resurrect/resurrect.tmux
# don't jump to bottom when mouse selection finishes
unbind -T copy-mode-vi MouseDragEnd1Pane