Expand description
Pango-markup rendering for the Anthropic widget — both the bar text and the bordered tooltip.
Closely mirrors claudebar:625-860. Pure functions over an immutable
RenderInput so all of the visual logic is unit-testable without I/O.
Structs§
- Render
Input - All inputs needed to render the widget — packaged so tests can construct it without any I/O.
Constants§
- DEFAULT_
FORMAT - Default format string when
--formatis omitted (claudebar:55). - WEEKLY_
ONLY_ FORMAT - Default format for an account with no five-hour window: the weekly window takes the bar, as it does for a Codex account without one.
Functions§
- default_
format - The bar text used when
--formatis omitted.DEFAULT_FORMATreads the session placeholders, which are empty when the account has no five-hour window, so such an account getsWEEKLY_ONLY_FORMATinstead of% ·. - render_
anthropic - Compose the full Waybar output for an Anthropic snapshot.