sim*_*mao 5 shell gnu-screen tmux
我正在使用以下屏幕状态行,在我的 screenrc 中配置:
我使用以下行配置它:
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
Run Code Online (Sandbox Code Playgroud)
我没有创建这个主题,我不记得我在哪里找到的,但我真的很喜欢它。
我现在正在将我的配置转换为tmux
,我似乎无法在我的tmux.conf
.
我走了这么远:
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'
set-window-option -g window-status-current-attr bright
set-window-option -g window-status-current-bg red
Run Code Online (Sandbox Code Playgroud)
产生这条线:
请忽略不同的主机名,它在不同的服务器上
我可以使用什么配置tmux
来生成与第一个类似的状态行?
谢谢!
除了突出显示的窗口周围的红色括号外,这是我可以轻松配置的最接近的近似值tmux 1.5
:
# default statusbar colors
set -g status-fg white
set -g status-bg default
# default window title colors
set-window-option -g window-status-fg white
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright
# statusline
set -g status-left '#[fg=green][ #H ]['
set -g status-right '#[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%I:%M #[fg=green]]'
Run Code Online (Sandbox Code Playgroud)
如果您希望以红色突出显示的窗口,请使用:
set-window-option -g window-status-current-fg red
Run Code Online (Sandbox Code Playgroud)
你也可以尝试这个:
set-window-option -g window-status-current-format "#[fg=red](#[fg=white]#I#F$ #W#[fg=red])"
set-window-option -g window-status-format "#[fg=normal]#I#F$ #W"
Run Code Online (Sandbox Code Playgroud)
使您的窗口列表看起来像屏幕配置中的一样。