Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Set the number of TMUX status lines based on the window width

4 views
Skip to first unread message

Scott Aitken

unread,
Nov 1, 2024, 10:58:17 AM11/1/24
to tmux-users
Hi,
Say I have two status line formats.  One with left, centre and right on one line, and another that has left and right on one line and centre on a second line.
When I resize my window down to a certain width I want to use the two line format, and when I resize up above that size I want the single line format.
Is this possible?
Thanks.

Nicholas Marriott

unread,
Nov 1, 2024, 11:23:14 AM11/1/24
to Scott Aitken, tmux-users
There is no session-resized hook but you can probably just do it based on the client, something like:

set-hook -g client-resized 'run -C "set -g status #{?#{e|<|:#{client_width},80},2,on}"'



--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/tmux-users/c587c511-6d9d-4074-8c5d-b9f092718fe1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages