-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
96 lines (71 loc) · 2.56 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
96
#设置C-a为默认触发键
set -g prefix C-a
unbind-key C-b
#像screen一样,按C-a C-a切换上一个窗口
bind-key C-a last-window
#使用C-a a 按键发送C-a按键
bind-key a send-prefix
#设置窗口的索引从1开始
set-option -g base-index 1
#将 r 绑定重新载入设置
unbind r
bind r source ~/.tmux.conf \; display "tmux conf file reloaded!"
#F5 窗口重命名
bind -n F5 command-prompt "rename-window %1"
unbind %
bind | splitw -h # 水平分割
unbind '"'
bind _ splitw -v # 垂直分割
bind k selectp -U # 选择上窗格
bind j selectp -D # 选择下窗格
bind h selectp -L # 选择左窗格
bind l selectp -R # 选择右窗格
# 调整窗口大小
bind ^k resizep -U 10
bind ^j resizep -D 10
bind ^h resizep -L 10
bind ^l resizep -R 10
bind ^u swapp -U # 交换上下窗口
bind ^d swapp -D # 交换左右窗口
bind m command-prompt "splitw -h 'exec man %%'"
bind p splitw -h 'exec ipython2'
bind -n F2 new-window
bind -n F3 previous-window
bind -n F4 next-window
bind C-a last-window
setw -g window-status-current-style "bg=red"
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
#Automatically set window title
setw -g automatic-rename
set-option -g status-keys emacs
set -g default-terminal "screen-256color"
## WINDOWS #####################################################################
## Window selection menu (usually bound to cb-w)
setw -g mode-style "bg=colour14,fg=colour232"
## STATUS BAR ##################################################################
## Status bar design
set -g status-justify left
set -g status-interval 5
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour255
## Show PREFIX on right side when c-b
set -g status-left '#[fg=colour1,bg=colour234,bold]#{?client_prefix,➥ ,}#[fg=colour255,bg=colour234][#S] '
set -g status-left-length 20
# Show prefix on left & date & time
set -g status-right '#[fg=colour255,bg=colour234,bold] %y/%m/%d #[fg=colour255,bg=colour234,bold] %H:%M'
set -g status-right-length 50
## Selected window
setw -g window-status-current-style "fg=colour232,bg=colour76,bold"
setw -g window-status-current-format ' #I:#W#F '
## Background windows
setw -g window-status-style "fg=colour188,bg=colour235"
#setw -g window-status-attr bold
setw -g window-status-format ' #I:#W#F '
## Background windows with event
setw -g window-status-bell-style "fg=colour7,bg=colour7"
## MESSAGES ####################################################################
set -g message-style "fg=colour232,bg=colour8,bold"
set -g message-command-style "fg=colour2,bg=colour232"