From 5bca7e176aff6f1672cc4fc54df0a3dfc54fc66b Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Fri, 28 Aug 2026 12:22:37 +0100 Subject: [PATCH] feat(tmux): show window names in the status bar and pane titles on the border Catppuccin renders #T, the pane title, in the window list. Any program in the pane can overwrite that with an OSC escape -- the shell writes the hostname and Claude Code writes its current task -- so a window renamed with prefix+, never appeared anywhere. The status bar now shows the window name, falling back to the pane title while a window holds a single pane. Once a window is split, pane titles appear on the pane borders instead; pane-border-status takes no format, so a window-layout-changed hook recomputes it on both split and close. Adds a binding for select-pane -T, which has no default. --- home/shell.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/home/shell.nix b/home/shell.nix index 4435b92..98d0a8d 100644 --- a/home/shell.nix +++ b/home/shell.nix @@ -313,6 +313,14 @@ in extraConfig = '' set -g @catppuccin_flavor 'mocha' set -g @catppuccin_window_status_style 'rounded' + # Catppuccin's default window text is #T, the pane title, which every + # program in the pane is free to overwrite -- the shell writes the + # hostname, Claude Code writes its current task, and a hand-set window + # name never appears. Show the window name instead, falling back to the + # pane title when the window holds a single pane and the two carry the + # same information anyway. + set -g @catppuccin_window_text ' #{?#{==:#{window_panes},1},#T,#W}' + set -g @catppuccin_window_current_text ' #{?#{==:#{window_panes},1},#T,#W}' ''; } resurrect # save/restore sessions @@ -357,6 +365,17 @@ in set -g renumber-windows on set -g set-clipboard on + # Pane titles on the border, but only once a window is split -- a single + # pane's title is already in the status bar. pane-border-status takes no + # format, so the hook recomputes it whenever the layout changes, which + # covers both splitting and closing a pane. + set -g pane-border-format " #P #{pane_title} " + set -g pane-border-status off + set-hook -g window-layout-changed 'set -Fw pane-border-status "#{?#{>:#{window_panes},1},top,off}"' + + # Pane titles have no default binding. + bind T command-prompt -p "pane title:" "select-pane -T '%%'" + # Catppuccin v2 statusline. Must run after the plugin has loaded; # home-manager appends this extraConfig after the whole plugin list. set -g status-left-length 100 -- 2.54.0