-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
79 lines (67 loc) · 2.22 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
# From Bin Li (binli@gnome.org)
#
# Prefix key.
set -g prefix C-a
unbind C-b
bind a send-prefix
# You can use the mouse wheel to scroll
#set -g mode-mouse on
# Sane scrolling, same with screen
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g default-terminal "screen-256color"
# Statusbar properties.
set -g status-bg black
set -g status-fg cyan
set -g status-left-length 25
set -g status-left '#[bg=green,fg=blue][#(ip r|grep src|egrep -v "lxc|br|docker|default|tun"|cut -d" " -f9)]#[default] '
setw -g window-status-current-format '#[fg=yellow,bg=black]@#[bold,fg=black, bg=yellow] #I #W '
set -g status-right "#(uname -r) %H:%M #[fg=blue,bg=red]%a#[default] %d-%b-%y"
# toggle statusbar
bind-key b set-option status
# open a man page in new window
bind m command-prompt "split-window -h 'exec man %%'"
bind t splitw -h top
# Bind function keys.
bind -n M-o new-window
bind -n M-1 select-window -t 0
bind -n M-2 select-window -t 1
bind -n M-3 select-window -t 2
bind -n M-4 select-window -t 3
bind -n M-5 select-window -t 4
bind -n M-6 select-window -t 5
# vi-style controls for copy mode
setw -g mode-keys vi
#setw -g utf8 on
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v
bind v split-window -h
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes like vim
# feel free to change the "1" to however many lines you want to resize by, only
# one at a time can be slow
bind < resize-pane -L 1
bind > resize-pane -R 1
bind - resize-pane -D 1
bind + resize-pane -U 1
bind y setw force-width 81
bind u setw force-width 0
#设置pane前景色
#set -g pane-border-fg green
#设置pane背景色
#set -g pane-border-bg black
#设置活跃pane前景色
#set -g pane-active-border-fg yellow
#设置活跃pane背景色
#set -g pane-active-border-bg yellow
# All new windows started at startup, you must run 'tmux attach'!!!
new -s binli -n gits -c '/source/gits/binli/'
neww -n gits -t binli:1 -c '/source/gits/'
neww -n lps -t binli:2 -c '/source/lps/'
neww -n lps -t binli:3 -c '/source/lps/'
neww -n sutton -t binli:4 -c '/source/lps/sutton/'
selectw -t 0