Releases: mryll/claudebar
v0.6.0
claudebar 0.6.0 — Smarter cold-boot startup & honest stale messaging
At boot, the widget often lost the race against DHCP/DNS: a ~7s retry budget would expire seconds before the network came up, leaving day-old data with an unexplained ⏸ for a full Waybar interval — and on multi-monitor setups, one bar stale while the others showed fresh data. No config changes needed — existing setups get all of this automatically.
Changed
- Adaptive retry deadline: boot-like starts (no cache, or cache older than 10 min) now poll transient network failures for up to ~20s before giving up. At the first exec there is nothing better to show than an empty module, and on re-execs Waybar keeps the previous output visible — so waiting beats rendering yesterday's data. Mid-session blips keep the quick ~6s budget.
- Multi-monitor episode marker (
.net_wait): only the first instance burns the long wait; siblings do a single quick attempt, so an offline boot converges on all bars in ~22s. - Explicit stale messaging: the tooltip footer now tells you exactly what's happening —
⏸ Waiting for network — data from 09:12 (3 h ago)for network waits,⏸ Stale — data from …for API errors (next to the existing HTTP error details). Appended to custom--tooltip-formattoo. Fresh data keepsUpdated HH:MM. - Robustness: clock-skewed cache mtimes are never treated as fresh;
flockwait raised 45s → 90s so a waiting sibling renders late instead of dying with a lock-timeout ⚠.
Unchanged
- Healthy-network output is byte-identical to v0.5.x (regression-checked against the v0.5.0 script). No new flags, no waybar config changes.
v0.5.1
claudebar 0.5.1 — Robust cold-boot startup
At boot, Waybar dispatches the widget before the network is up; the single failed request left the widget paused (⏸) on stale data for a full interval (often 5 minutes).
Fixed
- Transient network failures are retried (3 attempts, 3s apart) in both the token refresh and the usage fetch — the boot network race now resolves within one dispatch instead of waiting for the next interval.
- No-response fetch failures no longer persist the
.stalemarker to disk. They reuse the recent cache with an in-memory stale flag (or show a neutral "Loading…" with no cache), matching the transient/hard split the token-refresh path already had. Disk markers and the desktop notification remain reserved for hard HTTP failures (4xx/5xx).
Unchanged
- No new flags, no behavior change on healthy networks. Hard API failures still surface
.stale,.last_errorand the tooltip HTTP section.
v0.5.0
claudebar 0.5.0 — Configurable framed font
The framed tooltip (--frame) pinned JetBrainsMono Nerd Font Mono. That's now just the default of a new --frame-font — point it at any complete Mono Nerd Font you already have instead of installing JBM.
Added
--frame-font: the font pinned in framed mode (defaultJetBrainsMono Nerd Font Mono). No effect in plain mode; the value is escaped for the Pango attribute.
Unchanged
- Default behavior is identical — plain tooltip by default; framed mode still pins JBM unless you override it.
v0.4.0
claudebar 0.4.0 — Plain tooltip by default, opt-in framed mode
The rich tooltip now renders plain (no border) by default, so it looks correct in any Waybar font — no specific font required. The framed "card" is now opt-in via --frame.
Changed
- Default is plain: the tooltip drops its box and renders in your bar font. Nothing is aligned to a right border, so a non–Nerd Font can never misalign it.
--frame(new): draws the bordered card and pinsJetBrainsMono Nerd Font Monoso the box, bars and icons stay aligned regardless of your bar font. Install a Nerd Font Mono (e.g.ttf-jetbrains-mono-nerd) for it.
Upgrade note
Existing setups lose the tooltip box on upgrade. Add --frame to your Waybar exec to bring it back.
v0.3.1
claudebar 0.3.1 — Tooltip polish
Visual refinements to the rich tooltip. No change to bar text, placeholders or behavior.
Changed
- Aligned value labels: percentages right-align to a fixed column across the Session, Weekly, Sonnet and Extra-usage blocks, so the numbers read as a clean column.
- Pace marker: the elapsed-pace marker is now a thin gate (
┃) in the foreground color, clearly distinct from the bar fill (█) instead of blending in. - Sonnet pace: the Sonnet-only block now shows its pace indicator (
↑ ↓ →), matching Session and Weekly. - Reset icon: reset lines use the Nerd Font clock glyph.
v0.3.0
claudebar 0.3.0 — Remaining mode
New opt-in --remaining flag that flips the bar text and rich tooltip to a "what's left" (battery) framing. Fully backward compatible — no behavior change without the flag.
Added
--remaining: the default bar text and tooltip show remaining quota (100 − used) instead of usage. The tooltip header gains a· Remainingsuffix and its bars drain like a battery, with the elapsed marker showing remaining time.- New placeholders, usable in any
--format/--tooltip-formatregardless of the flag:{session_remaining_pct},{weekly_remaining_pct},{sonnet_remaining_pct}— remaining percent (clamped 0–100).{session_remaining_bar},{weekly_remaining_bar},{sonnet_remaining_bar}— battery / drain bars.
Unchanged
- Without
--remaining, output is byte-identical to 0.2.3 (verified by a regression guard across a fixture × flag matrix). - Pacing indicators (
↑ ↓ →, ahead/behind, elapsed) and the extra-usage meter keep their existing usage framing.
v0.2.3
Fixes
- Hardened against malformed credentials and API-usage payloads: the widget now always exits 0 with valid Waybar JSON for any input, instead of crashing under
set -euo pipefail. Every external/credentialjqread is type-safe and range-clamped, and the usage payload is validated as a single JSON document before parsing. Covers wrong-typed fields, scientific-notation (1e100) and negative numbers, and corrupt/multi-document caches.
v0.2.2
Fixes the widget vanishing from Waybar for users whose effective LC_NUMERIC uses a comma decimal separator (es_AR, de_DE, pt_BR, fr_FR, …).
Fixed
printf '%.0f'inparse_pctrejected a floatutilization(e.g.13.0, which jq ≥ 1.7 preserves) under a comma-decimal numeric locale:strtodwon't accept the., soprintffailed,set -euo pipefailaborted the script before any JSON was emitted, and Waybar hid the module. Rounding now happens injq(| round), which emits a locale-independent integer literal. (#4)
v0.2.1
Improves widget resilience at cold boot: when the OAuth refresh fails because the network is still settling, the bar now reuses the last known usage with the ⏸ stale indicator instead of getting stuck on a blank Loading… text until the next Waybar dispatch. Matches the sibling codexbar behavior.
Fixed
- Cold-boot transient refresh failures (curl HTTP 000 — DHCP/DNS still settling) now keep the last cached usage with the
⏸stale indicator instead of falling back toLoading…. Previously the cache was only accepted within the 5h session window, so an overnight-off PC would always land onLoading…and stay there until the next Waybar refresh (interval: 300by default). - Hard refresh failures (4xx/5xx) reuse cache up to the weekly window as well, for consistency. The desktop notification and
⏸stale marker still fire so the user gets an actionable signal.
Changed
- Refresh
curl --max-timebumped 15s → 25s to tolerate slow DHCP/DNS at boot. - Cache
flock -wbumped 30s → 45s so multi-monitor instances don't bail while one peer is mid-refresh.
v0.2.0
Adds the {*_bar} placeholder family — Pango-colored progress bars usable in
--format and --tooltip-format for every usage window. Drop-in compatible
with existing v0.1.x configurations.
Added
{session_bar},{weekly_bar},{sonnet_bar},{extra_bar}placeholders
(#3 by @victorsosaMx, completed in a follow-up commit)
Changed
- Per-window colors and bars computed once at top level; dedicated
tip_*_bar
variants for the marker-decorated tooltip path - Removed duplicate
color_forcalls inside the tooltip block
Example
claudebar --format '{session_bar} {session_pct}% · {session_reset}'
# => ████████░░░░░░░░░░░░ 42% · 1h 30mFull changelog: v0.1.21...v0.2.0