-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
45 lines (35 loc) · 1.56 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
# let tpm manage tpm
set -g @plugin 'tmux-plugins/tpm'
# tpm plugins
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
# use 256 colours
set -g default-terminal "screen-256color"
# use the mouse
set-option -g mouse on
# set the xterm title
set-option -g set-titles on
set-option -g set-titles-string '[#S:#I] #W'
# make the status line useful
set-option -g status-utf8 on
set -g status-bg black
set -g status-fg green
set -g status-left-length 20
set -g status-left ' #h:#S |'
set -g status-right '| #[fg=yellow]%Y.%m.%d %H:%M '
set -g status-justify left
# load powerline
run-shell "powerline-daemon -q"
source "$PYTHONPATH/powerline/bindings/tmux/powerline.conf"
# set the leader to Ctrl+a
unbind C-b
set -g prefix C-a
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux-current-pane-command | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux-current-pane-command | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux-current-pane-command | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux-current-pane-command | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux-current-pane-command | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'