-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_tmux.conf
More file actions
83 lines (73 loc) · 3.15 KB
/
_tmux.conf
File metadata and controls
83 lines (73 loc) · 3.15 KB
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
# 此类配置可以在命令行模式中输入show-options -g查询
## 开启可视化响铃,现在状态栏上。
set-option -g visual-bell on
## 窗口的初始序号;默认为0,这里设置为1
set-option -g base-index 1
## 提示信息的持续时间;设置足够的时间以避免看不清提示,单位为毫秒
set-option -g display-time 5000
## 控制台激活后的持续时间;设置合适的时间以避免每次操作都要先激活控制台,单位为毫秒
set-option -g repeat-time 1000
## 状态栏右方的内容;这里的设置将得到类似23:59的显示
#set-option -g status-right "#(date +%H:%M_%m/%d_%a)"
## 状态栏右方的内容长度;建议把更多的空间留给状态栏左方(用于列出当前窗口)
#set-option -g status-right-length 16
## 设置终端类型
#set -g default-terminal "xterm-256color"
#set -g default-terminal "screen-256color"
## 启用鼠标
#set-option -g mouse-resize-pane on
#set-option -g mouse-select-pane on
#set-option -g mouse-select-window on
#此类设置可以在命令行模式中输入show-window-options -g查询
## 复制模式中的默认键盘布局;可以设置为vi或emacs
set-window-option -g mode-keys emacs
## 开启窗口的UTF-8支持
set-window-option -g utf8 on
# 当tmux看到每微秒2行以上的更新时 (缺省是每微秒250行,这个缺省值我觉得太大了)
#set-window-option -g c0-change-trigger 2
# 就停止连续更新当前的window, 改为每30毫秒刷新一次 (缺省是每100微秒刷新,靠,太快了吧)
#set-window-option -g c0-change-interval 30000
# 添加自定义快捷键
## 将激活控制台的快捷键由Ctrl+b修改为Ctrl+v, 避免和 Bash 快捷键冲突,
## 但是和 Vim 的 VISUAL 模式有冲突,需要按 2 次 Vim 才有效
unbind-key "C-b"
set-option -g prefix "C-v"
bind-key "C-v" send-prefix
## 重新加载配置文件
bind-key R source-file ~/.tmux.conf \; display-message " ✔ Reload Configure Completed!"
## https://github.com/xuxiaodong/tmuxen/blob/master/_tmux.conf ##
## https://linuxtoy.org/archives/scripting-tmux.html[脚本化TMUX] ##
# modes
setw -g clock-mode-colour colour223
setw -g mode-attr bold
setw -g mode-fg colour223
setw -g mode-bg colour235
# statusbar
set -g status-utf8 on
set -g status-interval 60
set -g status-keys emacs
setw -g mode-keys emacs
setw -g automatic-rename on
# Identifying Activity in Other Windows
setw -g monitor-activity on
set -g visual-activity on
#-- colorscheme --#
# see also: https://github.com/daethorian/conf-tmux/blob/master/colors/zenburn.conf
set -g status-justify centre
set -g status-bg colour235
set -g status-fg colour248
set -g status-attr dim
set -g status-left "#[fg=red]#S:#[fg=yellow]#I.#[fg=blue]#P_#35T#[fg=green]❱#[default]"
set -g status-left-attr bright
set -g status-left-length 45
set -g status-right "#[fg=green]❰#[fg=blue]#(cat /proc/loadavg)#[default]"
set -g status-right-attr bright
set -g status-right-length 30
setw -g window-status-current-fg black
setw -g window-status-current-bg green
setw -g window-status-current-attr bold
setw -g window-status-current-format "#I:#W#F"
# messages
set -g message-attr bold
set -g message-fg white
set -g message-bg blue