Description
Colors set in mode_* format strings are reset at the {mode} widget boundary. This means subsequent content in format_left / format_right / format_center does not inherit the colors from the mode widget, making it impossible to dynamically style other widgets (like {session}) based on the current mode.
Steps to Reproduce
plugin location="..." {
format_left "{mode}{session} {tabs}"
mode_locked "#[bg=#31748f,fg=#191724,bold] LOCKED "
mode_tmux "#[bg=#eb6f92,fg=#191724,bold] COMMAND "
}
Expected: {session} renders on the #31748f (or #eb6f92) background set by the mode widget, since no color reset is specified between {mode} and {session}.
Actual: Colors reset to terminal defaults after {mode}. The session name renders with default terminal colors (white on black), not the mode's background.
I also tested with plain text between {mode} and {session} — same result: terminal default colors.
Use Case
I'd like the entire left block (icon + session name) to change background color when switching modes (e.g., pine background in locked mode, red in tmux/command mode). Currently only the content inside {mode} can change color per mode.
Possible Solutions
- Preserve colors across widget boundaries — don't reset colors after rendering
{mode}, let them carry into the rest of the format string
- Mode-aware color variables — expose something like
{mode_bg} / {mode_fg} that can be used in format_left / format_right (e.g., "#[bg={mode_bg}]{session}")
- Allow widget placeholders inside
mode_* — expanding {session} inside mode format strings would let users compose mode-dependent blocks
Environment
- zjstatus: latest (downloaded from GitHub releases)
- zellij: 0.41.2
- OS: macOS
Thanks for the great plugin!
Description
Colors set in
mode_*format strings are reset at the{mode}widget boundary. This means subsequent content informat_left/format_right/format_centerdoes not inherit the colors from the mode widget, making it impossible to dynamically style other widgets (like{session}) based on the current mode.Steps to Reproduce
Expected:
{session}renders on the#31748f(or#eb6f92) background set by the mode widget, since no color reset is specified between{mode}and{session}.Actual: Colors reset to terminal defaults after
{mode}. The session name renders with default terminal colors (white on black), not the mode's background.I also tested with plain text between
{mode}and{session}— same result: terminal default colors.Use Case
I'd like the entire left block (icon + session name) to change background color when switching modes (e.g., pine background in locked mode, red in tmux/command mode). Currently only the content inside
{mode}can change color per mode.Possible Solutions
{mode}, let them carry into the rest of the format string{mode_bg}/{mode_fg}that can be used informat_left/format_right(e.g.,"#[bg={mode_bg}]{session}")mode_*— expanding{session}inside mode format strings would let users compose mode-dependent blocksEnvironment
Thanks for the great plugin!