tmux/Session/Q/How can I give the session name more room in the status line?
Properties
- logseq-entity
- Logseq/Entity/Question
How can I give the tmux/session/Name more room in the tmux/Status Line?
AI Answer
- Short answer: raise tmux/Option/status-left-length. One line in
~/.config/tmux/tmux.conf(tmux/Config): What is doing the cutting
- tmux/Option/status-left is
[#{session_name}], so a name of N characters wants N + 3 columns. status-left-lengthdefaults to10, andstatus-format[0]applies it as#{T;=/#{status-left-length}:status-left}— keep the first ten characters, discard the rest. The bracket takes one of them, so nine characters of the session name survive, and the closing]is never reached:encode-2026-08-17draws as[encode-20.- Nothing else is narrowing it. The default
status-lefthas no per-cell=N:limit inside the format string, so the length cap is the only bound on the name. A per-cell limit would survive any change to the cap.
- tmux/Option/status-left is
What it costs
- The cap is a maximum, not a reservation: with
status-justify leftthe window list starts immediately after whatever the left component actually drew, so the columns come out of the window list, and only for sessions whose names are long. Session name Left component drawn Columns Beyond the default gardening[gardening]12 2 cos-2026-08-17[cos-2026-08-17]17 7 encode-2026-08-17[encode-2026-08-17]20 10 mn-kb chief of staff 2026-08-17 mon[mn-kb chief of staff 2026-08-17 mon]38 28 - Nothing is lost until the three parts together exceed the client width, at which point the window list is what gets the
<and>scroll markers. A six-window session with a 107-column window list and a 39-column right component needs 163 columns at a 17-column left, against 156 at the default cap — so a 191-column terminal has room to spare. - The numbers for any given client:
- The cap is a maximum, not a reservation: with
Where to find more columns
- Drop the brackets from
status-leftfor two more characters of name per session: - Take eleven columns off the right end by shortening the pane-title cell in tmux/Option/status-right, then bringing tmux/Option/status-right-length down to match:
- Shorten the window names when the window list is the part under pressure — each one costs its index, a colon, its name and a flag column, plus a separator.
- Drop the brackets from
Sources
- Short answer: raise tmux/Option/status-left-length. One line in