tmux 的设置

tmux的配置文件是~/.tmux.confcode

unbind C-b                                                                                                                 
set -g prefix C-a 
# bind a reload key
bind R source-file ~/.tmux.conf \; display-message "Config reloaded"

# status bar
# color
set -g status-bg black
set -g status-fg white
# alignment
set-option -g status-justify centre
# left bottom corner
set-option -g status-left '#[bg=black,fg=green][#[fg=cyan]#S#[fg=green]]'
set-option -g status-left-length 20
# windown list
setw -g automatic-rename on
set-window-option -g window-status-format '#[dim]#I:#[default]#W#[fg=grey,dim]'
set-window-option -g window-status-current-format '#[fg=cyan,bold]#I#[fg=blue]:#[fg=cyan]#W#[fg=dim]'
# right bottom corner
set -g status-right "\"#H\"%Y-%m-%d %H:%M:%S"
  • 解绑C-b的前缀键
  • 设定全局前缀键为C-a
  • 绑定按键R(大写)为装载.tmux.conf文件,这样就不用退出再进入tmux了
  • 设置状态栏的背景为黑色
  • 设置状态栏的前景为白色
  • 设置状态栏的对齐为居中
  • 设置状态栏的左侧显示
  • 设置状态栏的左侧显示长度为20字符
  • 设置窗口自动更名(根据运行的程序)
  • 设置状态栏的窗口名称显示格式
  • 设置状态栏的当前窗口名称显示格式
  • 设置状态栏的右侧显示
相关文章
相关标签/搜索