tmux: plain window formats -- the nested ones ate the status line

The circled-number window formats expand to 92 characters through ten
levels of nested conditionals, one per window index. tmux lays out the left
segment, then the window list, then hands the remainder to the right -- and
that list was wide enough that the right segment got no room, so the host,
IP and clock vanished while the left side stayed put.

Restoring the pretty format after shrinking status-right-length brought the
problem straight back, so the width of the list is the cause rather than
the right segment's declared length.

Plain #I:#W renders to twelve characters and the right side stays.
This commit is contained in:
2026-08-24 17:40:39 -07:00
parent 79c485ea6f
commit cb4936f336
+2 -2
View File
@@ -80,8 +80,8 @@ set -g pane-active-border-style fg=colour39
set -g message-style fg=colour16,bg=colour221,bold set -g message-style fg=colour16,bg=colour221,bold
set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]#[fg=colour245,bg=colour238,bold] #(whoami) ' set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]#[fg=colour245,bg=colour238,bold] #(whoami) '
set -g status-right '#[bold][#[nobold,fg=colour229]#h#[fg=default] / #[fg=colour229]#(~/.local/bin/tmux-net)#[fg=default,bold]]#[nobold,fg=colour255] %-I:%M%P %d-%b-%Y ' set -g status-right '#[bold][#[nobold,fg=colour229]#h#[fg=default] / #[fg=colour229]#(~/.local/bin/tmux-net)#[fg=default,bold]]#[nobold,fg=colour255] %-I:%M%P %d-%b-%Y '
set -g window-status-format '#[fg=colour235,bg=colour252,nobold] #{?#{==:#{window_index},1},❶,#{?#{==:#{window_index},2},❷,#{?#{==:#{window_index},3},❸,#{?#{==:#{window_index},4},❹,#{?#{==:#{window_index},5},❺,#{?#{==:#{window_index},6},❻,#{?#{==:#{window_index},7},❼,#{?#{==:#{window_index},8},❽,#{?#{==:#{window_index},9},❾,#{?#{==:#{window_index},10},❿,#{window_index}}}}}}}}}}} #{b:pane_current_path} #W ' set -g window-status-format ' #I:#W '
set -g window-status-current-format '#[fg=colour234,bg=colour39,bold] [#[fg=colour232,bold]#{?window_zoomed_flag,#[fg=colour228],} #{?#{==:#{window_index},1},❶,#{?#{==:#{window_index},2},❷,#{?#{==:#{window_index},3},❸,#{?#{==:#{window_index},4},❹,#{?#{==:#{window_index},5},❺,#{?#{==:#{window_index},6},❻,#{?#{==:#{window_index},7},❼,#{?#{==:#{window_index},8},❽,#{?#{==:#{window_index},9},❾,#{?#{==:#{window_index},10},❿,#{window_index}}}}}}}}}}} #{b:pane_current_path} #W #[fg=colour234,bold]] ' set -g window-status-current-format ' [#I:#W] '
set-option -g status-interval 60 set-option -g status-interval 60
# Patch for OS X pbpaste and pbcopy under tmux. # Patch for OS X pbpaste and pbcopy under tmux.