在升级到 tmux 2.9a 版之后,我不得不更新我的配置文件,因为一些设置的名称发生了变化。状态栏窗口标题部分的颜色不再有效。这是我的配置文件的那一部分:
# set color for status bar
set-option -g status-style bg=colour235
set-option -g status-style fg=yellow
set-option -g status-style dim
# set window title list colors
set-window-option -g window-status-style fg=brightblue
set-window-option -g window-status-style bg=colour236
set-window-option -g window-status-style dim
# active window title colors
set-window-option -g window-status-current-style fg=brightred
set-window-option -g window-status-current-style bg=colour236
set-window-option -g window-status-current-style bright
Run Code Online (Sandbox Code Playgroud)
无论我选择什么颜色或亮度,状态栏的标题区域都显示白色文本。我的整个 tmux 配置文件在这里:https : //github.com/zanshin/dotfiles/blob/master/tmux/tmux.conf
cas*_*ams 11
tmux -Lfoo -f/dev/null start\\; show -gw\nRun Code Online (Sandbox Code Playgroud)\ntmux -Lfoo -f/dev/null start\\; show -g\nRun Code Online (Sandbox Code Playgroud)\nwindow-active-style default\nwindow-size smallest\nwindow-status-activity-style reverse\nwindow-status-bell-style reverse\nwindow-status-current-format "#I:#W#{?window_flags,#{window_flags}, }"\nwindow-status-current-style default\nwindow-status-format "#I:#W#{?window_flags,#{window_flags}, }"\nwindow-status-last-style default\nwindow-status-separator " "\nwindow-status-style default\nwindow-style default\nRun Code Online (Sandbox Code Playgroud)\n这些颜色只是为了看到差异
\n# ---------------- #\n# Define Colors #\n# ---------------- #\nGRAY="#808080"\nBLUE="#569CD6"\nDARK_BLUE="#223E55"\nRED="#EE4646"\nYELLOW="#CCCC99"\nBACKGROUND="#000000"\nFOREGROUND="#CCCCCC"\n\n# ----------------- #\n# Define Status Bar #\n# ----------------- #\nset -g status-interval 1\nset -g status-style bg=$BACKGROUND,fg=$BLUE\n\n# ------------ #\n# Define Panes #\n# ------------ #\nset -g pane-border-style fg=$DARK_BLUE\nset -g pane-active-border-style fg=$BLUE\n\n# ---------------- #\n# Define Left Side #\n# ---------------- #\nset -g status-left " "\n\n# -------------- #\n# Define Windows #\n# -------------- #\nset -g window-status-current-format "#[fg=$BLUE] \xe2\x9e\xa4 "\nset -g window-status-format " \xe2\x9e\xa4 "\nset -g window-status-activity-style fg=$RED\nset -g window-status-bell-style fg=$YELLOW\nset -g window-status-separator " "\nset -g window-style default\nset -g window-status-style bg=$BACKGROUND,fg=$GRAY\n\n# ----------------- #\n# Define Right Side #\n# ----------------- #\nset -g status-right-length 150\nset -g status-right "#T %Y-%m-%d %H:%M:%S "\nRun Code Online (Sandbox Code Playgroud)\n
语法略有变化(我喜欢新的)。您现在可以将多个属性放在同一行上,用逗号分隔。
使用新语法,您在问题中的配置变为:
# set color for status bar
set-option -g status-style bg=colour235,fg=yellow,dim
# set window title list colors
set-window-option -g window-status-style fg=brightblue,bg=colour236,dim
# active window title colors
set-window-option -g window-status-current-style fg=brightred,bg=colour236,bright
Run Code Online (Sandbox Code Playgroud)
有关其他信息,您可以参考tmux 的常见问题解答
| 归档时间: |
|
| 查看次数: |
5937 次 |
| 最近记录: |