Repository navigation
feat(themes): apply color themes in regular (non-powerline) mode (fg-only) - #12
Merged
Merged
Conversation
…only Add a top-level `theme` setting that cycles a POWERLINE_THEMES segment palette across widgets as foreground colors when powerline is disabled. The theme's bg[] array is the vivid palette (fg[] holds the dark text-on-segment colors); ansi16-level bg* names are converted with the existing bgToFg() helper. Semantics: explicit per-widget colors win over the theme, theme beats widget defaults; explicit colors keep their palette slot so the rhythm of the surrounding widgets is stable. Separators and flex separators are neither themed nor consume slots; merged widgets share one slot; preserves-colors widgets keep their intrinsic ANSI output and still advance the slot - both mirroring the powerline renderer. Unset, 'custom', or unknown names disable theming. Additive optional schema key - configs written before it parse unchanged (no version bump); `ccstatusline set theme <name>` works through the existing generic `set` allowlist with zero CLI changes. Closes the feature half of sirmalloc#604. Co-Authored-By: Claude Code <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes the built-in theme catalog usable in regular (non-powerline) mode: a new top-level
themesetting cycles the chosen theme's segment palette across widgets as foreground colors. Feature half of sirmalloc#604 (the U+E0B0 separator fallback is deliberately left for a separate change).Semantics
theme: "dracula"(anyPOWERLINE_THEMESname) cyclestheme[level].bg[]as widget foregrounds —bg[]is the vivid segment palette, whilefg[]holds the dark text colors meant to sit on those segments. ansi16-levelbg*names are converted through the existingbgToFg()helper.'custom'/ unknown name → no theming. The level followscolorLevel, using the 16/256/truecolor calibrations already shipped with each theme.ccstatusline set theme <name>/getwork through the existing generic allowlist — zero CLI code changes. A TUI picker is left to the maintainer; this PR is config+CLI only.Verification
bun test: 2450 pass / 0 fail. Newrenderer-regular-theme.test.tscovers cycle order, explicit-wins + slot rhythm, separators unthemed, preserves-colors, merged widgets sharing a slot, unset/'custom'/unknown names, level 1/2/3 (including thebgToFgconversion for ansi16 palettes), and schema round-trip.bun run lintclean;bun run buildOK.theme: "dracula",colorLevel: 3config: uncolored widgets emit exact truecolor codes (38;2;189;147;249,38;2;248;248;242, …), separators stay unthemed.set theme nord→get --jsonreports"theme":"nord".🤖 Generated with Claude Code