-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
95 lines (79 loc) · 2.46 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
85
86
87
88
89
90
91
92
93
94
95
unbind C-b
set -g prefix C-a
bind-key C-a send-prefix
set -g history-limit 30000
set -g mouse on
set -ga terminal-overrides 'xterm*:smcup@:rmcup@'
set-option -g default-terminal screen-256color
unbind '"'
unbind %
unbind v
bind-key - splitw -v # 分割成上下两个窗口
bind-key | splitw -h # 分割成左右两个窗口
#select window
bind-key space next-window
bind-key bspace previous-window
bind-key enter next-layout
bind-key -n F2 new-window
bind-key -n F3 previous-window
bind-key -n F4 next-window
bind-key -n F5 detach-client
bind-key -n C-F3 swap-window -t -1
bind-key -n C-F4 swap-window -t +1
bind-key a last-pane
bind-key o display-panes
bind-key c new-window
bind-key t previous-window
# begin-selection space
# cancel-selection esc
# copy-selection enter
# select-line V
set-window-option -g mode-keys vi
bind-key [ copy-mode
bind-key ] paste-buffer
#select pane
bind-key j select-pane -D
bind-key k select-pane -U
bind-key h select-pane -L
bind-key l select-pane -R
# kill pane (prefix q)
bind q killp
# kill window (prefix Ctrl+q)
bind ^q killw
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# app
# htop (prefix !)
bind ! splitw htop
bind @ splitw ncmpcpp
# man (prefix m)
bind m command-prompt "splitw 'exec man %%'"
# messages
#set -g message-attr bold
set -g message-style fg=colour111
set -g message-style bg=colour235
set -g allow-rename off
set-option -g status on
set -g status-interval 5
set -g status-justify left
# set -g status-position top
# visual notification of ;ctivity in other windows
setw -g monitor-activity off
set -g visual-activity on
# set color for status bar
set -g status-style bg=colour235 #base02
set -g status-style fg=black
setw -g clock-mode-colour colour255
set -g pane-border-style fg=white
set -g pane-active-border-style fg=blue
#set -g pane-active-border-bg blue
set -g window-status-current-format "#I:#W#F"
set -g window-status-style fg=colour000
set -g window-status-style bg=colour255
#set -g window-status-attr bright
set -g window-status-current-style fg=black
set -g window-status-current-style bg=blue
#set -g window-status-current-attr bright
set -g status-left-length 85
set -g status-left "#[fg=yellow][#S]#[fg=default] #[fg=colour235]#[bg=colour157]#(whoami)@#h#[bg=black] "
set -g status-right-length 100
set -g status-right "#S #I:#P #[fg=colour235]#[bg=colour2]#(uptime|awk '{print \" \"$(NF-2),$(NF-1),$(NF)\" \"}')#[bg=colour3]#(ip route get 1|head -1|awk '{print \" \" $7 \" \"}')#[bg=colour4] %Y-%m-%d %H:%M:%S "