Repository navigation
Releases: aishwaryasingh51/ccstatusline
Releases · aishwaryasingh51/ccstatusline
Release list
v1.2 — Token count in context segment
What's new
The context window segment now shows raw token usage alongside the percentage:
- Context segment now reads
12% (24.2k/200k)— percent first, tokens in parentheses - Used-token count shares the same gradient color as the percentage; denominator stays muted
- Git status flags (
!,?) are now both gold — consistent dirty-tree color - Single-space separation between git, plan badge, and model name — cleaner left side
- Separators collapse automatically when a segment is absent (e.g. no plan badge)
- Falls back to percent-only before the first API response or after
/compact
Changes
- Parse
context_window.total_input_tokensandcontext_window_sizein the singlejqcall - Add
fmtk()helper: zero-subshell compact kilo formatting (16600→16.6k) _sepvariable handles collapsing separators between git/plan/model segments- Untracked flag
?switched fromC_MUTEDtoC_GOLDto match modified flag! - Updated README preview screenshot and segment table
- Added Changelog section to README
v1.1.0 — Bug fixes & robustness
What's changed
Bug fixes
- Backup clobbering on macOS (bash 3.2) — The installer named backups using
$EPOCHSECONDS, which is undefined in bash 3.2 (the macOS system shell). Every reinstall silently overwrote the previous.bak.file. Fixed with${EPOCHSECONDS:-$(date +%s)}— the same guard the statusline already used. Both the script backup and thesettings.jsonbackup are affected. - Backup accumulation — Each reinstall now keeps only the 3 most recent
.bak.*files per path; older ones are pruned automatically.
Robustness
- Hex validation before gradient arithmetic —
_lerp/grad/grad_remconsumed_G1h–_G4h(parsed from theme files) without validating they were 6 valid hex characters. A malformedcolors.jsonproduced arithmetic errors and garbage escape sequences instead of a clean fallback. A guard block now checks all four values before the gradient functions; anything invalid triggers the existing ANSI discrete-band fallback. No visible change on valid themes.
Installer behaviour
-yno longer hijacks the shell —bash install-statusline.sh -ypreviouslyexec clauded at the end, replacing the caller's shell. Non-interactive runs now skip the "Start Claude Code now?" step entirely. Interactive runs are unchanged.
Tooling
sync-statusline.sh— New helper that mechanises the heredoc re-splice documented inCLAUDE.md. Run it after editingstatusline-command.shinstead of the manualhead/tail/mvdance. Supports--check(exits non-zero on drift, usable in pre-commit/CI) and--splice(re-splice only, no deploy).
Upgrading
bash install-statusline.sh -yNo configuration changes required. Rendered output is unchanged.
v1.0.0 — Initial release
ClaudeCode Statusline v1.0.0
Adaptive, theme-aware statusline for Claude Code.
Features
- Two-line layout: path on line 1, all metrics on line 2
- Colors sourced live from Ghostty, Alacritty, iTerm2 (macOS) or Noctalia, Matugen, Wallust, pywal, Omarchy (Linux) — ANSI fallback everywhere else
- Git status with colour-coded flags: ✓ green (clean) · + rose (staged) · ! gold (modified) · ? muted (untracked)
- Context window usage computed from token counts when
used_percentageis unavailable - 7-day and 5-hour rate-limit countdowns with green → gold → red gradient
- Distro/OS icon auto-detected at install time
- ~18–28ms render time using only bash builtins
Install
bash install-statusline.sh
