-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
84 lines (68 loc) · 1.89 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
# Setup
run-shell 'mkdir -p ~/.tmux/flags'
# Appearance
set -g prefix2 S-Down
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g default-command $SHELL
set -g default-shell $SHELL
set -sg escape-time 0 # no delay for escape key press
set -g mode-keys vi
set -g exit-empty on
bind r source-file ~/.tmux.conf \; display-message 'Reloaded ~/.tmux.conf!'
# Terminal
set -g default-terminal "screen-256color"
set -g terminal-overrides 'xterm:colors=256'
set -g history-limit 10000
set -g set-titles on
set -g set-titles-string '#W : #h'
# Mouse
if-shell '[ -f ~/.tmux/flags/mouse-on ]' {
set -g mouse on
}
bind m {
set -g mouse on
run-shell 'touch ~/.tmux/flags/mouse-on'
}
bind M {
set -g mouse off
run-shell 'rm -f ~/.tmux/flags/mouse-on'
}
# Window
set -g monitor-activity off
set -g visual-activity off
set -g status on
set -g status-keys vi
set -g status-style fg=black,bg=blue
set -g status-left " "
set -g status-left-length 1
set -g status-right " (#h) %H:%M %d %b %Y %Z [#S] #{?mouse,"🐁 ",""}"
set -g status-right-length 128
# panes
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind e setw synchronize-panes
bind M-j resize-pane -D 5
bind M-k resize-pane -U 5
bind M-h resize-pane -L 5
bind M-l resize-pane -R 5
# alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# copy mode
bind -n S-Up copy-mode
# Plugins
if-shell 'which git' {
if-shell '[ ! -d ~/.tmux/plugins/tpm ]' {
run-shell 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'
}
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
run -b '~/.tmux/plugins/tpm/tpm'
}