-
Notifications
You must be signed in to change notification settings - Fork 3
/
.tmux.conf
65 lines (55 loc) · 2.28 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
# Server options
set-option -s default-terminal "tmux-256color"
set-option -s escape-time 1
set-option -s focus-events on
set-option -s set-clipboard on
set-option -sg extended-keys always
set-option -sa terminal-overrides "xterm*:RGB"
set-option -sa terminal-overrides "xterm*:sitm=\e[3m"
set-option -sa terminal-overrides "xterm*:ritm=\e[23m"
# Session options
set-option -g display-time 5000
set-option -g history-limit 10000
set-option -g mouse on
set-option -g allow-passthrough on
set-option -g set-titles on # set title of iterm2 window and touch bar
set-option -g set-titles-string "#S:#I:#W" # shorter than the default
set-option -g status-style bg=colour237,fg=colour250
set-option -g status-keys emacs # makes more sense there than vi
# Window options
set-window-option -g mode-keys vi
set-window-option -g aggressive-resize on
set-window-option -g window-status-style fg=cyan
set-window-option -g window-status-current-style fg=red,bold
set-window-option -g pane-active-border-style bg=blue
set-window-option -g monitor-activity on
# Change tmux prefix
set-option -g prefix C-q
unbind-key C-b
bind-key C-q send-prefix
# Key bindings
bind-key b set-option status
bind-key R source-file ~/.tmux.conf \; display-message "configuration reloaded"
# moving between panes
bind-key -r h select-pane -L
bind-key -r j select-pane -D
bind-key -r k select-pane -U
bind-key -r l select-pane -R
# resizing panes
bind-key -r C-h resize-pane -L
bind-key -r C-j resize-pane -D
bind-key -r C-k resize-pane -U
bind-key -r C-l resize-pane -R
bind-key -r M-h resize-pane -L 5
bind-key -r M-j resize-pane -D 5
bind-key -r M-k resize-pane -U 5
bind-key -r M-l resize-pane -R 5
# scroll one line at the time with the mouse wheel, not 5
bind-key -T copy-mode WheelUpPane select-pane \; send-keys -X scroll-up
bind-key -T copy-mode WheelDownPane select-pane \; send-keys -X scroll-down
bind-key -T copy-mode-vi WheelUpPane select-pane \; send-keys -X scroll-up
bind-key -T copy-mode-vi WheelDownPane select-pane \; send-keys -X scroll-down
# don't immediately exit copy mode after dragging
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection-no-clear
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection-no-clear
bind-key -T root MouseDragEnd1Pane send-keys -X copy-selection-no-clear