Skip to content

Releases: aishwaryasingh51/ccstatusline

v1.2 — Token count in context segment

Choose a tag to compare

@aishwaryasingh51 aishwaryasingh51 released this 01 Jun 15:57

What's new

The context window segment now shows raw token usage alongside the percentage:

Statusline v1.2

  • 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_tokens and context_window_size in the single jq call
  • Add fmtk() helper: zero-subshell compact kilo formatting (16600 → 16.6k)
  • _sep variable handles collapsing separators between git/plan/model segments
  • Untracked flag ? switched from C_MUTED to C_GOLD to match modified flag !
  • Updated README preview screenshot and segment table
  • Added Changelog section to README

v1.1.0 — Bug fixes & robustness

Choose a tag to compare

@aishwaryasingh51 aishwaryasingh51 released this 01 Jun 13:38

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 the settings.json backup 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_rem consumed _G1h–_G4h (parsed from theme files) without validating they were 6 valid hex characters. A malformed colors.json produced 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

  • -y no longer hijacks the shell — bash install-statusline.sh -y previously exec 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 in CLAUDE.md. Run it after editing statusline-command.sh instead of the manual head/tail/mv dance. Supports --check (exits non-zero on drift, usable in pre-commit/CI) and --splice (re-splice only, no deploy).

Upgrading

bash install-statusline.sh -y

No configuration changes required. Rendered output is unchanged.

v1.0.0 — Initial release

Choose a tag to compare

@aishwaryasingh51 aishwaryasingh51 released this 31 May 20:16

ClaudeCode Statusline v1.0.0

Adaptive, theme-aware statusline for Claude Code.

Preview

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_percentage is 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