-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
74 lines (63 loc) · 2.45 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
## 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
## modify prefix to activate tmux
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# 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 k select-pane -U # above (prefix k)
bind j select-pane -D # below (prefix j)
bind h select-pane -L # left (prefix h)
bind 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-option -g status-style "fg=white"
set-option -g status-style "bg=black"
set-window-option -g window-status-style "fg=cyan"
set-window-option -g window-status-style "bg=default"
set-window-option -g window-status-style "dim"
set-window-option -g window-status-current-style "fg=white"
set-window-option -g window-status-current-style "bg=red"
set-window-option -g window-status-current-style "bright"
set-option -g pane-border-style "fg=green"
set-option -g pane-border-style "bg=black"
set-option -g pane-active-border-style "fg=white"
set-option -g pane-active-border-style "bg=yellow"
set-option -g message-style "fg=white"
set-option -g message-style "bg=black"
set-option -g message-style "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