Using environment variables in Tmux status bar shell commands
Tmux expands time formats with strftime
in status-left
and status-right
before it expands #(…)
and other sharp escape sequences. So %H:%M
is expanded to the local time first, and date
runs with an argument that is already numeric.
Double the percent signs.
set -g status-right "#[fg=white]#S #I:#P #[fg=yellow]:: %d %b %Y #[fg=green]:: #(TZ=America/New_York date +%%H:%%M) :: #(TZ=UTC date -u +%%H:%%M) UTC :: #(TZ=Europe/Belgrade date +%%H:%%M)"