Repository navigation
feat(statusline): colour the statusline by role and choose the bar characters - #534
Merged
Merged
Conversation
…aracters colours.* set the colour of each part of the statusline by role (the context and quota bars below their warning thresholds, the warning and critical colours, the model and label text, and the unused part of a bar) and bar.filled and bar.empty set the characters a bar is drawn with. A colour is a name, a palette index or #rrggbb, and NO_COLOR still turns all colour off. The defaults draw what the statusline always drew. Text that has no colour is no longer wrapped in a lone reset, which put an escape sequence into NO_COLOR output.
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.
Colours and bar characters for the built-in statusline, the shared infrastructure the other element groups paint with.
colours.*colours the statusline by role (contextandusagebelow their warning threshold,warningandusageWarningfrombands.warnAt,criticalfrombands.criticalAt,model,label, andemptyfor the unused part of a bar), andbar.filledandbar.emptychoose the characters a bar is drawn with. A colour is a name, a 0 to 255 palette index or#rrggbb;defaultleaves the terminal's own colour. The defaults draw exactly what the statusline drew before,NO_COLORstill turns everything off, and the existing render tests pass unchanged.One small fix on the way: text with no colour used to be followed by a lone reset, which put an escape sequence into
NO_COLORoutput. It is now left alone.Roles for elements that do not exist yet (project, git, custom line) arrive with those elements, so
statusline keysnever lists a setting that does nothing. Nine claude-hud colour settings are mapped in the parity table.