Statusline
The ox TUI renders a single-row statusline at the bottom of the screen in one of two modes: built-in configurable segments (the default) or full external command replacement.
Built-in Segment Mode
Section titled “Built-in Segment Mode”By default, the statusline renders rounded pill badges split into left and right groups:
- Left: Active model display name (falling back to the wire model ID) and context usage formatted as
<pct>%(orCtx: <pct>%inplainandpowerlinestyles) when the context window size is known, or<used>kotherwise. Context usage changes color across three configurable thresholds (context_thresholds.warn_pctandcontext_thresholds.error_pct, defaulting to50and80). - Right:
expandedwhen tool details are expanded (Ctrl+O), plus the active agent state (thinking,streaming, or the running tool name) only while busy.
StatusLineConfig is deserialized from TOML by ox-tui and exposes style, left, and right fields so callers can choose a layout style and reorder or customize the bar.
Layout Styles (statusline.style)
Section titled “Layout Styles (statusline.style)”| Style | Description |
|---|---|
pill |
Default. Rounded pill badges with theme-derived backgrounds and 1-cell Unicode icons (falling back to [ / ] in ASCII) |
plain |
Minimal flush-left segments with an accent model label, configured status_separator, and Ctx: <pct>% labels |
powerline |
Alternating pill backgrounds joined by chevron transitions (falling back to > / < in ASCII) |
Built-in Segments
Section titled “Built-in Segments”| Segment | Description |
|---|---|
model |
Active model display name (or wire model identifier) |
context |
Context token usage with 3-tier color thresholds |
expanded |
Shown as expanded when tool call details are expanded |
status |
Active agent state (thinking, streaming, or tool name) |
{ command = ["..."] } |
First stdout line from an external command as one segment |
[statusline]style = "pill"left = ["model", "context", { command = ["git", "branch", "--show-current"] }]right = ["expanded", "status"]
[statusline.context_thresholds]warn_pct = 50error_pct = 80External Command Mode
Section titled “External Command Mode”Setting command on StatusLineConfig replaces the built-in layout with the first line of stdout from an external command:
[statusline]command = ["my-statusline", "--compact"]ox writes a JSON snapshot to the command’s stdin:
{ "cwd": "/path/to/repo", "workspace": { "current_dir": "/path/to/repo" }, "model": { "id": "gemini-4-hydrogen" }, "context": { "used_tokens": 12000, "window_size": 1048576 }, "status": "idle"}The stdout line is parsed with a built-in ANSI SGR parser supporting 16-color, 256-color, and 24-bit RGB foreground and background colors along with bold, dim, italic, underline, and reset modifiers.