feat: customizable key format, colors, aliases, and compact display#30
feat: customizable key format, colors, aliases, and compact display#30AdamsGH wants to merge 3 commits into
Conversation
- modifier_style: long/short/symbol key display (Ctrl+n, C-n, ^n)
- hint_format: template for each hint ({key}, {action})
- separator: configurable delimiter between hints
- color customization: global, per-label, and per-mode color overrides
- max_keys: limit alternative keybindings shown per action
- alias_{label}: rename action labels in display
- key_alias_{key}: rename special bare keys (Enter→⏎, Space→␣)
Closes b0o#5, closes b0o#12
Configuration examplesEvery example below is independent — pick what you need, ignore the rest. Example 1: Just make keys shorterThe simplest change. Turns zjstatus-hints location="..." {
modifier_style "symbol"
}Before: If you prefer Example 2: Add separators between hintsBy default hints are glued together. A separator makes them easier to read: zjstatus-hints location="..." {
separator " · "
}Before: Other ideas: Example 3: Too many keys per action? Limit themZellij merges zjstatus-hints location="..." {
max_keys "4"
}Before: Set to Example 4: Rename long action labelsSome labels like zjstatus-hints location="..." {
alias_fullscreen "full"
alias_split_right "S→"
alias_split_down "S↓"
alias_rename "ren"
alias_half_page "½pg"
alias_select "sel"
}Before: You can alias any label that appears in the bar. Common ones: Example 5: Replace special key names with symbols
zjstatus-hints location="..." {
key_alias_enter "⏎"
key_alias_space "␣"
key_alias_esc "⎋"
key_alias_tab "⇥"
}Before: Example 6: Custom hint templateChange how each hint is structured. The default is zjstatus-hints location="..." {
hint_format "{key}:{action}"
}Before: Another option — action name first: hint_format "{action}[{key}]"
// Result: new[n] close[x] full[f]Example 7: Custom colorsOverride the Zellij palette colors with your own hex values: zjstatus-hints location="..." {
// Global — applies to all hints
key_fg "#ffffff"
key_bg "#6e5fb7"
label_fg "#cccccc"
label_bg "#4c435c"
// Per-label — override specific actions
quit_key_bg "#ff0000"
quit_label_bg "#cc0000"
// Per-mode + per-label — most specific
pane.new_key_bg "#00ffcc"
}Colors cascade: mode-specific → label-specific → global → Zellij palette. Each of the four color slots (key_fg, key_bg, label_fg, label_bg) resolves independently, so you can mix and match at different levels. Example 8: Full compact setup (everything combined)A real-world config combining all features for a tight statusbar: plugins {
zjstatus-hints location="file:~/.config/zellij/plugins/zjstatus-hints.wasm" {
pipe_name "zjstatus_hints"
hide_in_base_mode true
max_length "0"
overflow_str "…"
// Compact keys
modifier_style "symbol"
separator " · "
max_keys "4"
// Short labels
alias_fullscreen "full"
alias_split_right "S→"
alias_split_down "S↓"
alias_rename "ren"
alias_half_page "½pg"
alias_increase "inc"
alias_decrease "dec"
alias_select "sel"
alias_break_pane "break"
alias_detach "det"
alias_manager "mgr"
// Symbolic keys
key_alias_enter "⏎"
key_alias_space "␣"
// Colors matching a dark purple theme
key_fg "#ffffff"
key_bg "#6e5fb7"
label_fg "#cccccc"
label_bg "#4c435c"
}
} |
|
bump |
Apply PR b0o#30 adding modifier_style, hint_format, separator, max_keys, action/key aliases, and per-label/per-mode color overrides.
Built from AdamsGH/zjstatus-hints feat/customizable-hints (PR b0o#30). Adds customizable key format, colors, aliases, and compact display.
|
Split out the transparent-background follow-up from neoighodaro's fork into a focused PR on top of this branch: It adds |
Customizable format by @y0usaf
|
Will this feature be merged any time soon? I would love be have this available :) |

Summary
Adds comprehensive customization options to zjstatus-hints, addressing
the long-standing requests for compact display (#12) and custom
styling (#5).
New configuration options
modifier_style"long"/"short"/"symbol"(^n, M-h)hint_format{key}and{action}variablesseparator" · ")max_keysalias_{label}alias_fullscreen "full")key_alias_{key}key_alias_enter "⏎")key_fg/bg,label_fg/bg{label}_key_fg{mode}.{label}_key_fgBefore / After
Default (unchanged):
With compact config (
modifier_style "symbol",separator "·", aliases,max_keys "4"):One more example, default & using by me for a few weeks
Backward compatibility
All new options have defaults that preserve existing behavior.
Zero-config installations produce identical output to the previous version.
Closes #5, closes #12 - hope this would be useful for someone else.
Thanks for this extension, mate - idk how'd I live without it with my bad memory - very useful stuff =)