-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
62 lines (52 loc) · 1.76 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
unbind C-b
set -g prefix M-a
bind-key a send-prefix
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind-key c new-window -c "#{pane_current_path}"
bind-key % split-window -h -c "#{pane_current_path}"
bind-key '"' split-window -v -c "#{pane_current_path}"
#up
bind-key k select-pane -U
#down
bind-key j select-pane -D
#left
bind-key h select-pane -L
#right
bind-key l select-pane -R
bind-key ^s command-prompt -p ssh: "new-window -n %1 'ssh %1'"
bind-key < swap-window -t -1
bind-key > swap-window -t +1
bind-key ^w choose-window 'swap-window -t %%'
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)
#bind-key y copy-pipe "xsel -i -p && xsel -o -p | xsel -i -b"
#bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
#select last window
bind-key C-l select-window -l
#
#copy-mode 将快捷键设置为vi 模式
#setw -g mode-keys vi
set-window-option -g mode-keys vi
set -g default-terminal "xterm-256color"
# set-window-option -g utf8 on
set-option -g mouse on
set -g set-titles on
set -g set-titles-string "#T"
# 状态栏
set -g status-interval 1
# 颜色
set -g status-bg black
set -g status-fg white
# 对齐方式
set-option -g status-justify centre
# 左下角
set-option -g status-left '#[bg=black,fg=green][#[fg=cyan]#S#[fg=green]]'
set-option -g status-left-length 20
# 窗口列表
setw -g automatic-rename off
set-window-option -g window-status-format '#[dim]#I:#[default]#F#W#[fg=grey,dim]'
set-window-option -g window-status-current-format '#[fg=cyan,bold]#I#[fg=blue]:#[fg=cyan]#F#W#[fg=dim]'
## 右下角
set -g status-right '#[fg=green][#[fg=cyan]#H %H:%M:%S %m-%d#[fg=green]]'