-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
78 lines (67 loc) · 2.43 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
## general
set-option -g history-limit 65535
## time
set-option -g display-time 5000 # message display time in (ms), should long enough
set-option -g repeat-time 1000 # lasting time (ms) between a repeatable command
set-option -sg escape-time 1 # waiting time (ms) after prefix, small for more responsitive
set-option -g default-terminal "screen-256color"
## style
set-option -g status-keys vi
set-window-option -g mode-keys vi
#set-window-option -g utf8 on
# control sessions
bind-key z kill-session
## split window
unbind '"'
bind - splitw -v # vertical split (prefix -)
unbind %
bind | splitw -h # horizontal split (prefix |)
## select pane (move like vim)
bind -r k select-pane -U # above (prefix k)
bind -r j select-pane -D # below (prefix j)
bind -r h select-pane -L # left (prefix h)
bind -r l select-pane -R # right (prefix l)
## resize pane
bind -r ^k resizep -U 10 # upward (prefix Ctrl+k)
bind -r ^j resizep -D 10 # downward (prefix Ctrl+j)
bind -r ^h resizep -L 10 # to the left (prefix Ctrl+h)
bind -r ^l resizep -R 10 # to the right (prefix Ctrl+l)
## easy to swich window, like byobu
bind-key -n F2 new-window
bind-key -n F3 previous-window
bind-key -n F4 next-window
## color
set -g status-fg white
set -g status-bg black
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
set -g message-fg white
set -g message-bg black
set -g message-attr bright
## status bar
#set-option -g status-utf8 on
set -g status-interval 60
set -g status-left "#[fg=green]Session: #S #[fg=yellow]Window: #I #[fg=cyan]Pane: #P"
set -g status-left-length 30
set-option -g status-right "#[fg=cyan]#(date +%H:%M' ')" # right part: time lisk 23:59
set-option -g status-right-length 10 # more space left for center part (window names)
set -g status-justify centre
## notify when window contain changed, find it slow in practise
#setw -g monitor-activity on
#set -g visual-activity on
## set mouse support
#set-window-option -g mode-mouse on
#set -g mode-mouse on
#set -g mouse-resize-pane on
#set -g mouse-select-pane on
#set -g mouse-select-window on
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode - e'"