Configurable per-item colors and threshold-based styling for statusline
Open 💬 2 comments Opened Mar 21, 2026 by 0xRaduan
Variant: CLI
Feature description
The statusline currently renders all items in a uniform style. It would be useful to assign distinct colors to individual items, and to have colors shift automatically based on threshold values — e.g., context usage turns amber at 60% and red at 80%.
Proposed config
[tui.status_line_styles]
[tui.status_line_styles.model-with-reasoning]
style = "bold cyan"
[tui.status_line_styles.context-used]
style = "green"
warn_threshold = 60.0
warn_style = "yellow"
critical_threshold = 80.0
critical_style = "bold red"
[tui.status_line_styles.five-hour-limit]
style = "purple"
warn_threshold = 60.0
warn_style = "yellow"
critical_threshold = 80.0
critical_style = "bold red"
[tui.status_line_styles.weekly-limit]
style = "purple"
warn_threshold = 60.0
warn_style = "yellow"
critical_threshold = 80.0
critical_style = "bold red"
[tui.status_line_styles.git-branch]
style = "bold magenta"
Why
- At a glance, you can distinguish model from context from rate limits — right now everything blends together
- Threshold-based coloring gives an early visual warning when context or rate limits are filling up, without having to read the numbers
- The statusline already supports selecting and reordering items via
/statuslineand[tui].status_line— per-item styling is the natural next step
Implementation notes
- ratatui
Styleis already used throughout the TUI, so the rendering plumbing exists - Color parsing could support named colors (
red,bold yellow) and hex (#f7768e) to match terminal conventions - Items without a configured style would continue rendering with the current default — fully backwards compatible
- The threshold logic would apply to items that have a numeric value (context-used, context-remaining, five-hour-limit, weekly-limit, used-tokens); for non-numeric items, only
stylewould apply
Related issues: #12841 (ANSI color control), #14043 (custom statusline widget API), #15278 (configurable prompt/background)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗