Skip to content

Show/Hide Status Line Modules based on window width. Does not work with all modules. #415

Answered by dreknix
chris4prez asked this question in Help
Discussion options

You must be logged in to vote

After reading tmux issue #1332 about escaping in conditions, I found this solution:

set -g status-right '#{?#{>=:#{window_width},101},#{?,,'
set -agF status-right '#{E:@catppuccin_status_cpu}'
set -ag status-right '},}'

I add an additional condition, since in the else part the comma must not be escaped.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@chris4prez
Comment options

@dreknix
Comment options

@chris4prez
Comment options

Answer selected by chris4prez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants