-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
78 lines (50 loc) · 1.68 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
# Use 256 color (if supported)
set -g default-terminal "screen-256color"
# Increased scrollback history
set-option -g history-limit 100000
# Vim key bindings
setw -g mode-keys vi
bind [ copy-mode
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-selection
bind -T copy-mode-vi R send-keys -X rectangle-toggle
bind ] paste-buffer
bind Space choose-buffer
# It makes no sense that the "first" pane is on the far right
set -g base-index 1
# Split panes using | and - (visually representative of splits)
bind | split-window -h
bind - split-window -v
# Switch panes using Alt-arrow without prefix
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
# Also switch using Alt-vim keys
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
# Also Ctrl+B followed by vim keys
bind h select-pane -L
bind l select-pane -R
bind k select-pane -U
bind j select-pane -D
# Enable mouse control
set -g mouse on
# Don't rename windows automatically
set-option -g allow-rename off
# Leave sessions alive until manually killed
set-option -g destroy-unattached off
# Reload config easily (since zsh means we're always in tmux)
bind r source-file ~/.tmux.conf
# No delay for escape key press
set -sg escape-time 0
# Update status bar more frequently (for CPU / mem stats)
set -g status-interval 2
# Show server info on the left side of status bar
set -g status-left-length 120
set -g status-right-length 120
set -g status-bg colour7
set -g status-left "#(~/.tmux.d/left.sh #{client_width})"
set -g status-right "#(~/.tmux.d/right.sh #{client_width})"