tmux 不会显示 12 小时时间
tmux won't display 12 hour time
我已将 clock-mode-style
选项设置为在我的 .tmux.conf
中使用 12 小时时间,如 the manpages:
中所述
set-window-option -g clock-mode-style 12
然后我保存了我的更改并使用 :source-file ~/.tmux.conf
重新加载了我的配置,但时钟仍然显示为 24 小时制:
clock-mode-style
和 clock-mode-colour
是 clock-mode
window.
的两个选项
例如 here's a blog about this mode.
为了达到你想要的效果(在状态栏中有一个 12 小时的时钟)你应该将你的 tmux 配置中的状态栏配置更改为如下内容:
set -g status-right "#[fg=cyan]%A, %d %b %Y %I:%M %p"
tmux 使用 strftime
配置它的状态行:
status-right string
Display string to the right of the status bar. By default, the current window title in double quotes, the date and the time are shown. As with status-left, string will be passed to strftime(3)
, character pairs are replaced, and UTF-8 is dependent on the status-utf8 option.
您可以使用@mbuckbee 的 "For a Good strftime
" website 来玩转配置。
我已将 clock-mode-style
选项设置为在我的 .tmux.conf
中使用 12 小时时间,如 the manpages:
set-window-option -g clock-mode-style 12
然后我保存了我的更改并使用 :source-file ~/.tmux.conf
重新加载了我的配置,但时钟仍然显示为 24 小时制:
clock-mode-style
和 clock-mode-colour
是 clock-mode
window.
的两个选项
例如 here's a blog about this mode.
为了达到你想要的效果(在状态栏中有一个 12 小时的时钟)你应该将你的 tmux 配置中的状态栏配置更改为如下内容:
set -g status-right "#[fg=cyan]%A, %d %b %Y %I:%M %p"
tmux 使用 strftime
配置它的状态行:
status-right string
Display string to the right of the status bar. By default, the current window title in double quotes, the date and the time are shown. As with status-left, string will be passed tostrftime(3)
, character pairs are replaced, and UTF-8 is dependent on the status-utf8 option.
您可以使用@mbuckbee 的 "For a Good strftime
" website 来玩转配置。