feat: update defaults, schema, and installer for new capabilities
Configuration and deployment updates to match the new feature set.
defaults.json:
- Dark theme palette switched from named ANSI to Dracula-inspired hex:
success=#50fa7b, warning=#f1fa8c, danger=#ff5555, accent=#8be9fd,
info=#bd93f9. Light theme unchanged (named ANSI with bold).
- Glyph characters normalized to Unicode escapes (clean/ahead/behind).
- Verbose layout (3 lines) reorganized:
Line 1: model, provider, spacer, lines_changed, project, vcs, beads
Line 2: context_bar, context_usage, cache_efficiency, spacer, cost,
cost_velocity, cost_trend, duration
Line 3: context_trend, tokens_raw, spacer, tools, turns, load,
cloud_profile, k8s_context, python_env, toolchain
- context_usage, cost_trend, context_trend now enabled by default.
- Trend widths increased from 8 to 12 characters.
- Context bar: bar_style=block, gradient=true.
- Tools: show_breakdown=true, top_n=7.
- New sections enabled: cloud_profile (P2), k8s_context (P3, ttl=30),
python_env (P3), toolchain (P3).
schema.json:
- Added $schema self-reference field for editor autocomplete.
- Expanded colorName from fixed enum to freeform string with docs
covering hex, bg:, modifiers, and palette refs.
- New section schemas: trendSection, contextTrendSection with width,
gradient, and threshold properties.
- context_bar: added bar_style, gradient, fill_char, empty_char.
- tools: added show_breakdown, top_n, palette array.
- All section types: added background and placeholder properties.
- Width description updated to clarify it's a max cap + fallback,
not an override.
- colorMatch additionalProperties relaxed from enum to string.
install.sh:
Complete rewrite for Rust binary workflow:
- Checks cargo and jq prerequisites.
- Builds release binary via cargo build --release.
- Installs to ~/.local/bin/claude-statusline with PATH check.
- Creates/updates ~/.claude/settings.json with statusLine command
(type: "command", --color=always, padding: 0).
- Symlinks statusline.json config if present in project.
- Removed all bash-script-era logic (symlinks, bash version checks).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
296
schema.json
296
schema.json
@@ -4,11 +4,12 @@
|
||||
"title": "Claude Code Status Line Configuration",
|
||||
"description": "Configuration for the claude-statusline status line script",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"version"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"description": "JSON Schema reference for editor support"
|
||||
},
|
||||
"version": {
|
||||
"type": "integer",
|
||||
"const": 1,
|
||||
@@ -77,6 +78,15 @@
|
||||
"token_velocity": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"cost_trend": {
|
||||
"$ref": "#/$defs/trendSection"
|
||||
},
|
||||
"context_trend": {
|
||||
"$ref": "#/$defs/contextTrendSection"
|
||||
},
|
||||
"context_remaining": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"lines_changed": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
@@ -154,9 +164,15 @@
|
||||
"properties": {
|
||||
"separator": {
|
||||
"type": "string",
|
||||
"description": "Separator between sections on a line. When justify is 'left', this is used as-is. When justify is 'spread' or 'space-between', the non-space characters (e.g. '|') are kept as a visual anchor and extra space is added around them.",
|
||||
"description": "Separator text between sections (used when separator_style is 'text'). When justify is 'spread' or 'space-between', the non-space characters are kept as visual anchors.",
|
||||
"default": " | "
|
||||
},
|
||||
"separator_style": {
|
||||
"type": "string",
|
||||
"enum": ["text", "powerline", "arrow", "none"],
|
||||
"description": "Separator style between sections. 'text': use the separator string. 'powerline': Nerd Font triangle (auto-falls-back to arrow if glyphs disabled). 'arrow': Unicode heavy angle quotation mark. 'none': spaces only.",
|
||||
"default": "text"
|
||||
},
|
||||
"justify": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -181,7 +197,7 @@
|
||||
"width": {
|
||||
"type": "integer",
|
||||
"minimum": 40,
|
||||
"description": "Explicit terminal width override. If omitted, auto-detection walks the process tree to find an ancestor with a real TTY, falling back to stty via /dev/tty, COLUMNS, tput cols, or 120."
|
||||
"description": "Maximum terminal width cap and fallback. Dynamic sources (ioctl, process tree, stty) take priority when available."
|
||||
},
|
||||
"width_margin": {
|
||||
"type": "integer",
|
||||
@@ -227,22 +243,11 @@
|
||||
},
|
||||
"colorName": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"red",
|
||||
"green",
|
||||
"yellow",
|
||||
"blue",
|
||||
"magenta",
|
||||
"cyan",
|
||||
"white",
|
||||
"dim",
|
||||
"bold"
|
||||
],
|
||||
"description": "Named ANSI color"
|
||||
"description": "Color specifier. Supports: named colors (red, green, yellow, blue, magenta, cyan, white), modifiers (dim, bold, italic, underline, strikethrough), hex (#FF6B35, #F00), backgrounds (bg:red, bg:#FF6B35), palette refs (p:success). Multiple can be space-separated (e.g., '#FF6B35 bold')."
|
||||
},
|
||||
"colorPalette": {
|
||||
"type": "object",
|
||||
"description": "Semantic color palette for a theme",
|
||||
"description": "Semantic color palette for a theme. Values support all colorName formats.",
|
||||
"properties": {
|
||||
"success": { "type": "string" },
|
||||
"warning": { "type": "string" },
|
||||
@@ -343,6 +348,14 @@
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -415,6 +428,14 @@
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -475,6 +496,14 @@
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -503,6 +532,25 @@
|
||||
"minimum": 3,
|
||||
"default": 10
|
||||
},
|
||||
"bar_style": {
|
||||
"type": "string",
|
||||
"enum": ["classic", "block"],
|
||||
"default": "block",
|
||||
"description": "Bar rendering style. 'classic': = and - characters. 'block': Unicode block characters with optional gradient."
|
||||
},
|
||||
"gradient": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Enable per-character gradient coloring (green to yellow to red). Only applies when bar_style is 'block'."
|
||||
},
|
||||
"fill_char": {
|
||||
"type": "string",
|
||||
"description": "Override character for filled portion. Default: '=' (classic) or full block (block)."
|
||||
},
|
||||
"empty_char": {
|
||||
"type": "string",
|
||||
"description": "Override character for empty portion. Default: '-' (classic) or light shade (block)."
|
||||
},
|
||||
"thresholds": {
|
||||
"$ref": "#/$defs/thresholds"
|
||||
},
|
||||
@@ -523,6 +571,14 @@
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -563,6 +619,14 @@
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -599,6 +663,14 @@
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -633,6 +705,135 @@
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"trendSection": {
|
||||
"type": "object",
|
||||
"description": "Sparkline trend visualization",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"width": {
|
||||
"type": "integer",
|
||||
"minimum": 3,
|
||||
"default": 8,
|
||||
"description": "Number of sparkline characters"
|
||||
},
|
||||
"gradient": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Enable per-character gradient coloring based on value"
|
||||
},
|
||||
"flex": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"min_width": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"contextTrendSection": {
|
||||
"type": "object",
|
||||
"description": "Context usage sparkline trend with threshold coloring",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"width": {
|
||||
"type": "integer",
|
||||
"minimum": 3,
|
||||
"default": 8,
|
||||
"description": "Number of sparkline characters"
|
||||
},
|
||||
"gradient": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Enable per-character gradient coloring based on value"
|
||||
},
|
||||
"thresholds": {
|
||||
"$ref": "#/$defs/thresholds"
|
||||
},
|
||||
"flex": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"min_width": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -656,6 +857,26 @@
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"show_breakdown": {
|
||||
"type": "boolean",
|
||||
"description": "Show per-tool breakdown in wide terminals (e.g. Bash: 84/Read: 35/Edit: 34)",
|
||||
"default": true
|
||||
},
|
||||
"top_n": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "Max number of tools to show in breakdown (0 = all). Adaptively reduced to fit terminal width.",
|
||||
"default": 7
|
||||
},
|
||||
"palette": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "Hex color string (#RRGGBB or #RGB)"
|
||||
},
|
||||
"description": "Rotating color palette for tool names. Override to customize; leave empty (default) to auto-detect from terminal config (WezTerm/Kitty/Alacritty) or fall back to built-in Dracula palette.",
|
||||
"default": []
|
||||
},
|
||||
"ttl": {
|
||||
"type": "number",
|
||||
"default": 2
|
||||
@@ -677,6 +898,14 @@
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -711,6 +940,14 @@
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -747,26 +984,23 @@
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
},
|
||||
"background": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors."
|
||||
},
|
||||
"placeholder": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"colorMatch": {
|
||||
"type": "object",
|
||||
"description": "Map of output value to color name",
|
||||
"description": "Map of output value to color specifier",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"red",
|
||||
"green",
|
||||
"yellow",
|
||||
"blue",
|
||||
"magenta",
|
||||
"cyan",
|
||||
"white",
|
||||
"dim",
|
||||
"bold"
|
||||
]
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"customCommand": {
|
||||
|
||||
Reference in New Issue
Block a user