Skip to main content

Module render

Module render 

Source
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§

RenderInput
All inputs needed to render the widget — packaged so tests can construct it without any I/O.

Constants§

DEFAULT_FORMAT
Default format string when --format is 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 --format is omitted. DEFAULT_FORMAT reads the session placeholders, which are empty when the account has no five-hour window, so such an account gets WEEKLY_ONLY_FORMAT instead of % · .
render_anthropic
Compose the full Waybar output for an Anthropic snapshot.