Expand description
Widget binary support: CLI parsing, per-vendor rendering, the always-exit-0
wrapper, and the local-testing renderers (--pretty, --watch, --json).
The library exposes building blocks here; the actual main lives in
src/bin/ai-usagebar.rs, which is a thin orchestration layer.
Modules§
- cli
- Command-line interface — claudebar-compatible flags plus the new
local-testing additions (
--pretty,--watch,--json). - pretty
- Terminal-mode renderer for
--prettyand--watchmodes. - render
- Pango-markup rendering for the Anthropic widget — both the bar text and the bordered tooltip.
- run
- The always-exits-0 orchestrator. Dispatches on
--vendor, fetches a snapshot, renders the right output mode, and prints. Catches every error into a fallback⚠JSON / pretty line so Waybar never hides the module.