v2.0.0 — Unified SL_SEGMENTS configuration
Breaking Changes
All 13 individual SL_SHOW_*, SL_HIDE_*, SL_SESSION_*, and SL_USAGE_LEFT_* environment variables have been replaced by a single SL_SEGMENTS variable.
Removed env vars
| Removed | Replacement |
|---|---|
SL_SHOW_MODEL_NAME |
Include/exclude model in SL_SEGMENTS |
SL_SHOW_SESSION_PROGRESS_BAR |
Include/exclude progress_bar |
SL_SHOW_SESSION_PERCENTAGE |
Include/exclude percentage |
SL_SHOW_SESSION_TOKENS |
Include/exclude tokens |
SL_SHOW_CURRENT_DIR |
Include/exclude directory |
SL_SHOW_GIT_BRANCH |
Include/exclude git_branch |
SL_SHOW_5H_USAGE_LEFT |
Include/exclude usage_5hour |
SL_SHOW_WEEKLY_USAGE_LEFT |
Include/exclude usage_weekly |
SL_SESSION_PROGRESS_BAR_WIDTH |
progress_bar:width=N |
SL_HIDE_DEFAULT_BRANCH |
git_branch:hide_default=1 |
SL_SHOW_FALLBACK_INFO |
percentage:fallback=1 and tokens:fallback=1 |
SL_USAGE_LEFT_GAUGE_STYLE |
usage_5hour:gauge=X / usage_weekly:gauge=X |
SL_USAGE_LEFT_BLOCK_GAUGE_WIDTH |
usage_5hour:width=N / usage_weekly:width=N |
Migration
If you had no custom SL_ variables — no changes needed. The defaults are identical.
If you customized visibility (e.g. SL_SHOW_GIT_BRANCH=0), list the segments you want:
# Before (v1.x)
SL_SHOW_GIT_BRANCH=0 SL_SESSION_PROGRESS_BAR_WIDTH=20 ~/.claude/claude-code-status-line.py
# After (v2.0)
SL_SEGMENTS="model progress_bar:width=20 percentage tokens directory usage_5hour usage_weekly" ~/.claude/claude-code-status-line.pyWhat's New
Unified SL_SEGMENTS variable
A single space-separated string controls which segments appear, in what order, and per-segment options via colon-separated key=value pairs:
SL_SEGMENTS="model progress_bar:width=20 percentage tokens directory git_branch:hide_default=0 usage_5hour:gauge=vertical usage_weekly:gauge=blocks:width=8"
Segment reordering
Segments render in the order specified — put directory first, model last, or any arrangement:
SL_SEGMENTS="directory git_branch model percentage"
Per-segment options
Each segment can have inline options:
| Segment | Option | Default |
|---|---|---|
progress_bar |
width |
12 |
git_branch |
hide_default |
1 |
percentage |
fallback |
1 |
tokens |
fallback |
1 |
usage_5hour |
gauge (vertical/blocks/none), width |
blocks, 4 |
usage_weekly |
gauge (vertical/blocks/none), width |
blocks, 4 |
Independent gauge configuration per usage window
Each usage gauge can now have its own style and width:
SL_SEGMENTS="usage_5hour:gauge=vertical usage_weekly:gauge=blocks:width=8"
Kept unchanged
SL_THEME,SL_THEME_FILE,SL_USAGE_CACHE_DURATION— global settings, unchanged- Custom theme files — fully compatible, no changes needed
- All visual output — identical when using defaults