Skip to content

feat(context_bar): add configurable filled_char and empty_char#155

Open
HotThoughts wants to merge 1 commit intostephenleo:mainfrom
HotThoughts:feat/context-bar-custom-chars
Open

feat(context_bar): add configurable filled_char and empty_char#155
HotThoughts wants to merge 1 commit intostephenleo:mainfrom
HotThoughts:feat/context-bar-custom-chars

Conversation

@HotThoughts
Copy link
Copy Markdown

Summary

  • Adds filled_char and empty_char fields to [cship.context_bar] config
  • Defaults to / for full backwards compatibility
  • Allows any Unicode character, enabling circle-style or custom bars

Motivation

The progress bar characters were hardcoded, making it impossible to customize the bar style. A common request is circle/dot-style indicators:

[cship.context_bar]
filled_char = ""
empty_char  = ""

which renders as ●●●●○○○○○○40% instead of ████░░░░░░40%.

Changes

  • src/config.rs: added filled_char: Option<String> and empty_char: Option<String> to ContextBarConfig
  • src/modules/context_bar.rs: read the new fields with fallback to defaults; updated doc comment
  • Added two new unit tests covering custom chars and partial override

Test plan

  • All 66 existing tests pass (cargo test)
  • New test test_context_bar_custom_filled_and_empty_chars verifies circle rendering
  • New test test_context_bar_only_filled_char_overridden verifies partial override falls back to default empty char

🤖 Generated with Claude Code

Allow users to customize the characters used to render the context bar
progress indicator via `filled_char` and `empty_char` config options.
Defaults remain `█` (filled) and `░` (empty) for backwards compatibility.

Example config for circle-style progress:
  [cship.context_bar]
  filled_char = "●"
  empty_char  = "○"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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