A compact Codex and Claude usage indicator for Quickshell and GNOME Shell. Both versions refresh every minute and animate the colored usage fill.
- Arch Linux: supported; install Quickshell with
sudo pacman -S quickshell. - Ubuntu: supported; install Quickshell from the official DankLinux PPA, then install this widget.
- Python 3.9+; no third-party Python packages.
- Quickshell 0.3.x and an
illogical-impulse-style config at$XDG_CONFIG_HOME/quickshell/ii. - GNOME Shell 45–50 through the native GNOME extension.
The collector is distribution-independent. It reads Codex rate-limit events from ~/.codex/sessions and Claude OAuth usage using ~/.claude/.credentials.json. It never prints access tokens.
git clone https://github.com/justrhey/quickshell-ai-usage.git
cd quickshell-ai-usage
./install.shFor a nonstandard config directory, pass it explicitly:
./install.sh /path/to/quickshell/configAdd the component inside the ColumnLayout in modules/ii/verticalBar/VerticalBarContent.qml:
AiUsageVertical {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
Layout.fillHeight: true
Layout.topMargin: 8
Layout.bottomMargin: 8
}If the config is not at the default ii path, set collectorPath on the component to the installed script's absolute path.
git clone https://github.com/justrhey/quickshell-ai-usage.git
cd quickshell-ai-usage
./install-gnome.shLog out and back in if GNOME does not detect the new extension, then enable AI Usage in Extension Manager or run:
gnome-extensions enable ai-usage@justrhey.github.ioThe indicator appears in the top panel. Open its menu to select Codex or Claude, or refresh immediately.
sudo add-apt-repository ppa:avengemedia/danklinux
sudo apt update
sudo apt install quickshell python3sudo pacman -S quickshell pythonNot running Quickshell? A GNOME Shell version lives in gnome-extension/. It reuses the same collector and shows one provider as a horizontal fill bar with the percentage inside; click to switch Codex/Claude. Install with ./gnome-extension/install.sh. See gnome-extension/README.md.
python3 scripts/ai_usage.py
python3 -m unittest discover -s tests -vAn unavailable account is reported as {\"available\": false}; that is normal when its CLI is not installed or logged in.
- The QML component uses
AppearanceandStyledTextfromillogical-impulse; GNOME users should use the native extension instead. - Claude usage relies on an undocumented OAuth endpoint used by Claude CLI and may change upstream.
- Usage is polled once per minute. Claude data is cached while Claude is inactive.