Desktop · GNOME Shell

Token Usage Widget

A GNOME Shell top-bar extension that surfaces meaningful Claude Code token usage at a glance — a colour-coded 5-hour rolling window, a daily breakdown, and an hourly burn sparkline — built because the raw numbers are misleading.

// live in the top bar — refreshes every 60s

gnome-shell · token-usage@local
Token Usage Widget shown in the GNOME top bar with a 5-hour window figure, daily breakdown and burn sparkline

Overview

Anthropic doesn't expose Max-plan limits as a token count, and the raw daily "total" is dominated by cache-reads — about 97% discounted — so it badly overstates real consumption. This extension parses the local Claude Code logs, isolates the tokens that actually count, and shows the meaningful figure right in the GNOME top bar, refreshing every minute.

What it shows

⏱️ 5-hour window

The headline figure tracks a rolling 5-hour window — matching the plan's throttling window — colour-coded from default to amber to red.

📊 Daily breakdown

The dropdown breaks out Last 5h, Today and Last 7 days, plus a full breakdown of today's usage.

📈 Burn sparkline

An hourly sparkline shows how today's usage built up over time, so spikes are obvious at a glance.

🎯 Real tokens only

Counts input + output + cache-creation and excludes the heavily-discounted cache-reads that inflate the raw total.

How it works

A small but pointed piece of desktop tooling: it answers a question the official UI doesn't — "how close am I, really?" — by measuring the number that actually matters.