-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
87 lines (71 loc) · 2.67 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
unbind-key C-b
set -g prefix C-s
bind-key C-s send-prefix
setw -g mode-keys vi
# run -b '~/.tmux/plugins/tpm/tpm'
set -s escape-time 0
set -sa terminal-overrides ",xterm*:Tc"
set -g set-clipboard on
set -g monitor-activity on
set -g mouse off
set -g automatic-rename on
set -g status-justify centre
set -g status-position bottom
set -g base-index 1
set -g pane-base-index 1
set -g history-limit 100000
set -g main-pane-height 70%
set -g main-pane-width 70%
set -g default-terminal "screen-256color"
set -g visual-activity on
#################
# keybindings #
#################
bind M-c new-window -c "#{pane_current_path}"
bind "M-'" split-window -c "#{pane_current_path}"
bind ^ split-window -h -c "#{pane_current_path}"
bind "C- " popup -x 0 -w 100% -h 28% -EE -T "Playground"
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind -r @ display-panes "swap-pane -dt %%"
bind -r S command-prompt -p "send pane to:" "join-pane -t '%%'"
bind -r C-\\ run "tmux select-pane -l"
bind -r Enter run "tmux set-option -g mouse;tmux display-message 'toggle mouse mode'"
bind C-u copy-mode -eu
bind -T copy-mode-vi 'v' send -X begin-selection
bind R source-file ~/.tmux.conf \; display-message "Config reloaded.."
bind M command-prompt -p "man:" "split-window 'exec vim -c \"Man %%\" -conly'"
###########################################################################
# 图形 #
###########################################################################
# 设置状态栏背景和文字颜色
set -g status-style fg=color244
set -g status-left-style fg=color244
set -g status-right-style fg=color244
# 设置右侧状态栏内容(时间、日期、主机名)
set -g status-right "%Y-%m-%d | #H "
# 当前前缀模式指示
set -g status-left-length 100
set -g status-left "Session: #S | #(whoami) #[fg=color255]#{?client_prefix,*,}"
# 设置窗格边框颜色
set -g pane-border-style fg=colour244
set -g pane-border-indicators arrows
set -g pane-border-lines heavy
set -g pane-border-status off
set -g pane-active-border-style fg=color255
# 设置窗口列表的样式
setw -g window-style fg=colour244
setw -g window-active-style fg=color255
setw -g window-status-style fg=colour244
setw -g window-status-current-style fg=colour255,underscore
setw -g window-status-last-style fg=colour255
setw -g window-status-bell-style fg=colour244
# 设置复制模式的颜色
setw -g mode-style fg=colour255,bg=colour244
setw -g message-style fg=colour244
setw -g cursor-colour colour244
setw -g cursor-style blinking-block
setw -g popup-border-lines simple
# vim:set foldenable ft=tmux foldmethod=marker: