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 /statusline and [tui].status_line — per-item styling is the natural next step

Implementation notes

  • ratatui Style is 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 style would apply

Related issues: #12841 (ANSI color control), #14043 (custom statusline widget API), #15278 (configurable prompt/background)

View original on GitHub ↗

2 Comments

o6uoq · 5 months ago

+1

cgongye-n · 4 months ago

Adding another user signal for this. The new /statusline support is useful, but the footer is visually much flatter than Claude Code’s status bar. Per-item colors, especially for model/reasoning, cost or usage, context, token counts, git branch, and cwd/project, would make the status line much easier to scan at a glance. Even a small built-in palette or theme option would help if full per-item style config is too much initially.