A GNOME Shell extension that displays remaining time for your Claude Code usage blocks directly in the top panel, automatically refreshing every 5 minutes (configurable).
- π Shows remaining time in active Claude Code usage blocks
- π Configurable auto-refresh interval (1-60 minutes)
- βοΈ Settings panel for customization
- π±οΈ Right-click menu for manual refresh and status info
- β‘ Lightweight native GNOME integration
- π Ready for extensions.gnome.org distribution
The extension appears in your top panel showing remaining time like "2h 35m" or "45m".
- GNOME Shell 45+ (Ubuntu 23.04+, Fedora 39+, etc.)
- Node.js and npm
ccusagenpm package
Coming soon - extension will be published to extensions.gnome.org
-
Download this repository:
git clone https://github.com/lordvcs/ccusage-indicator.git cd ccusage-indicator -
Run the install script:
chmod +x install.sh ./install.sh
The script will:
- Check all dependencies (Node.js, npm, ccusage)
- Install ccusage if missing
- Copy extension files to the correct location
- Compile GSettings schemas
- Provide instructions to enable the extension
-
Enable the extension:
gnome-extensions enable ccusage-indicator@lordvcs.github.io -
Restart GNOME Shell:
- Press
Alt+F2, typer, press Enter - Or log out and back in
- Press
-
Install ccusage:
npm install -g ccusage
-
Install the extension manually:
# Clone or download this repository cp -r ccusage-indicator@lordvcs.github.io ~/.local/share/gnome-shell/extensions/ # Compile schemas glib-compile-schemas ~/.local/share/gnome-shell/extensions/ccusage-indicator@lordvcs.github.io/schemas/ # Restart GNOME Shell (Alt+F2, type 'r', press Enter) # Or log out and back in # Enable the extension gnome-extensions enable ccusage-indicator@lordvcs.github.io
The extension shows different states:
- "2h 35m (30%)" - Hours and minutes remaining with usage percentage
- "45m (75%)" - Minutes remaining with percentage (when less than 1 hour)
- "2h 35m" - Time only (when percentage data unavailable)
- "No session" - No active Claude Code usage block
- "Ended" - Current block has expired
- "Error" - Failed to fetch usage data
- "Refreshing..." - Currently updating
- Refresh Now - Manually update the display
- Status Information - Shows detailed status
Access settings via:
- GNOME Extensions app β Claude Code Usage Indicator β Settings
- Command line:
gnome-extensions prefs ccusage-indicator@lordvcs.github.io
Available Settings:
- Refresh Interval: 1-60 minutes (default: 5 minutes)
- Show Detailed Time: Display format preferences
- Command Path: Custom ccusage command (default:
npx ccusage) - Command Timeout: How long to wait for command completion (5-120 seconds)
The extension:
- Executes
npx ccusage blocks --jsonat configured intervals - Parses JSON output to find the active usage block (
"isActive": true) - Calculates remaining time from
projection.remainingMinutesorendTime - Updates the panel display with formatted time
Uses the ccusage package to fetch Claude Code usage information. The extension looks for:
- Active blocks with
"isActive": true - Remaining time from
projection.remainingMinutes(preferred) - Fallback calculation from
endTimeminus current time
# Check if extension is enabled
gnome-extensions list --enabled | grep ccusage-indicator
# Check for errors
journalctl -f -o cat /usr/bin/gnome-shell
# Try restarting GNOME Shell
# Press Alt+F2, type 'r', press Enter# Verify ccusage is installed and working
npx ccusage --version
npx ccusage blocks
# Check if you're logged into Claude Code
# Make sure you have active usage to display# Reset settings to defaults
gsettings reset-recursively org.gnome.shell.extensions.ccusage-indicator
# Check schema compilation
ls ~/.local/share/gnome-shell/extensions/ccusage-indicator@lordvcs.github.io/schemas/# Install in development location
ln -sf $PWD/ccusage-indicator@lordvcs.github.io ~/.local/share/gnome-shell/extensions/
# Watch logs
journalctl -f -o cat /usr/bin/gnome-shell | grep -i ccusage
# Reload extension after changes
gnome-extensions disable ccusage-indicator@lordvcs.github.io
gnome-extensions enable ccusage-indicator@lordvcs.github.io# Create zip for extensions.gnome.org
cd ccusage-indicator@lordvcs.github.io
zip -r ../ccusage-indicator.zip * --exclude="*.git*"- GNOME Shell: 45, 46, 47+
- Tested on: Ubuntu 25.04
- Architecture: All (extension is pure JavaScript)
This project is open source under MIT License. See the ccusage package for its licensing terms.
P.S: this was coded using claude code
