show both Claude 5hr utilization and OpenCode spend in tmux status #12

Merged
bryan merged 1 commit from tmux-claude-and-openrouter-widgets into main 2026-04-23 05:18:42 +00:00
Owner

Summary

The old tmux status widget tracked Claude Max 5-hour rate-limit usage; it was replaced in 8a28e27 by a rolling 24h OpenCode/OpenRouter spend widget. This PR shows both side-by-side so the bar reflects the two resources that actually meter my work.

Changes

  • dot-tmux/claude-usage.sh (restored) — Claude Max 5h utilization % and reset countdown, cached 5 min. Always renders in orange (#FF9E64); the old tiered green/yellow/red thresholds are gone since this widget is now a gauge next to the spend widget, not the sole signal.
  • dot-tmux/token-usage-cost.py — returns early with no output (not even its trailing separator) when rolling 24h spend is $0, so the OpenCode/OpenRouter widget only appears once it has something to say.
  • dot-tmux.confstatus-right calls both widgets back-to-back. Each script owns its own trailing |, so the bar stays clean when either is silent.

Display

  • Both active: ✨ 52% ↻ 3:55 | 💸 $3.20/24h | basename | HH:MM
  • Spend idle: ✨ 52% ↻ 3:55 | basename | HH:MM
  • Claude unavailable (no creds / API fail): 💸 $3.20/24h | basename | HH:MM

Test plan

  • claude-usage.sh renders ✨ NN% ↻ H:MM in orange
  • token-usage-cost.py emits nothing when 24h spend ≤ $0
  • tmux source-file ~/.tmux.conf reloads without error
  • Verify spend widget reappears once OpenCode posts a non-zero assistant message
## Summary The old tmux status widget tracked Claude Max 5-hour rate-limit usage; it was replaced in `8a28e27` by a rolling 24h OpenCode/OpenRouter spend widget. This PR shows both side-by-side so the bar reflects the two resources that actually meter my work. ## Changes - `dot-tmux/claude-usage.sh` (restored) — Claude Max 5h utilization % and reset countdown, cached 5 min. Always renders in orange (`#FF9E64`); the old tiered green/yellow/red thresholds are gone since this widget is now a gauge next to the spend widget, not the sole signal. - `dot-tmux/token-usage-cost.py` — returns early with no output (not even its trailing separator) when rolling 24h spend is `$0`, so the OpenCode/OpenRouter widget only appears once it has something to say. - `dot-tmux.conf` — `status-right` calls both widgets back-to-back. Each script owns its own trailing ` | `, so the bar stays clean when either is silent. ## Display - Both active: `✨ 52% ↻ 3:55 | 💸 $3.20/24h | basename | HH:MM` - Spend idle: `✨ 52% ↻ 3:55 | basename | HH:MM` - Claude unavailable (no creds / API fail): `💸 $3.20/24h | basename | HH:MM` ## Test plan - [x] `claude-usage.sh` renders `✨ NN% ↻ H:MM` in orange - [x] `token-usage-cost.py` emits nothing when 24h spend ≤ $0 - [x] `tmux source-file ~/.tmux.conf` reloads without error - [ ] Verify spend widget reappears once OpenCode posts a non-zero assistant message
Restore the Claude Max 5-hour utilization widget alongside the rolling
24h OpenCode/OpenRouter spend widget. Claude renders in a fixed orange
so it always reads as the rate-limit gauge; the spend widget stays quiet
(no output, no separator) while total is $0 and joins the bar once spend
appears.
bryan changed title from show both Claude 5hr utilization and OpenCode spend in tmux status to WIP: show both Claude 5hr utilization and OpenCode spend in tmux status 2026-04-23 05:06:26 +00:00
bryan changed title from WIP: show both Claude 5hr utilization and OpenCode spend in tmux status to show both Claude 5hr utilization and OpenCode spend in tmux status 2026-04-23 05:15:44 +00:00
bryan merged commit 2ed5ce477f into main 2026-04-23 05:18:42 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bryan/dotfiles!12
No description provided.