Skip to content

SMALL: StatusLine: per-section visibility toggles#1492

Open
thatsjet wants to merge 1 commit into
danielmiessler:mainfrom
thatsjet:statusline-section-toggles
Open

SMALL: StatusLine: per-section visibility toggles#1492
thatsjet wants to merge 1 commit into
danielmiessler:mainfrom
thatsjet:statusline-section-toggles

Conversation

@thatsjet

Copy link
Copy Markdown

Every normal-mode section (header, state, effort, doctor, memory, versions, agents, context, usage, quote) gets a SHOW_* gate. Script defaults are all true — zero behavior change out of the box. Per-user overrides read from settings.json (preferences.statusline.sections) so they survive version upgrades that overwrite this script.

Hiding usage also skips its background OAuth/API fetch, not just the render. Separator lines are owned by their sections so hidden sections don't leave stacked rules. The settings.json eval is injection-safe: keys are regex- restricted to ^[a-z]+$ and values normalize to literal true/false.

…s.json overrides)

Every normal-mode section (header, state, effort, doctor, memory, versions,
agents, context, usage, quote) gets a SHOW_* gate. Script defaults are all
true — zero behavior change out of the box. Per-user overrides read from
settings.json (preferences.statusline.sections) so they survive version
upgrades that overwrite this script.

Hiding usage also skips its background OAuth/API fetch, not just the render.
Separator lines are owned by their sections so hidden sections don't leave
stacked rules. The settings.json eval is injection-safe: keys are regex-
restricted to ^[a-z]+$ and values normalize to literal true/false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant