feat: complete Rust port of claude-statusline
Port the entire 2236-line bash statusline script to Rust. Implements all 25 sections, 3-phase layout engine (render, priority drop, flex/justify), file-based caching with flock, 9-level terminal width detection, trend sparklines, and deep-merge JSON config. Release binary: 864K with LTO. Render time: <1ms warm. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
841
schema.json
Normal file
841
schema.json
Normal file
@@ -0,0 +1,841 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://github.com/tayloreernisse/claude-statusline/schema.json",
|
||||
"title": "Claude Code Status Line Configuration",
|
||||
"description": "Configuration for the claude-statusline status line script",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"version"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"version": {
|
||||
"type": "integer",
|
||||
"const": 1,
|
||||
"description": "Config schema version"
|
||||
},
|
||||
"global": {
|
||||
"$ref": "#/$defs/globalConfig"
|
||||
},
|
||||
"presets": {
|
||||
"type": "object",
|
||||
"description": "Named layout presets. Each preset is an array of arrays of section IDs.",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/layoutArray"
|
||||
}
|
||||
},
|
||||
"layout": {
|
||||
"description": "Active layout. Either a preset name (string) or a direct layout array.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Name of a preset defined in 'presets'"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/layoutArray"
|
||||
}
|
||||
],
|
||||
"default": "standard"
|
||||
},
|
||||
"sections": {
|
||||
"type": "object",
|
||||
"description": "Configuration for built-in sections",
|
||||
"properties": {
|
||||
"model": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"provider": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"project": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"vcs": {
|
||||
"$ref": "#/$defs/vcsSection"
|
||||
},
|
||||
"beads": {
|
||||
"$ref": "#/$defs/beadsSection"
|
||||
},
|
||||
"context_bar": {
|
||||
"$ref": "#/$defs/contextBarSection"
|
||||
},
|
||||
"context_usage": {
|
||||
"$ref": "#/$defs/contextUsageSection"
|
||||
},
|
||||
"tokens_raw": {
|
||||
"$ref": "#/$defs/tokensRawSection"
|
||||
},
|
||||
"cache_efficiency": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"cost": {
|
||||
"$ref": "#/$defs/costSection"
|
||||
},
|
||||
"cost_velocity": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"token_velocity": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"lines_changed": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"duration": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"tools": {
|
||||
"$ref": "#/$defs/toolsSection"
|
||||
},
|
||||
"turns": {
|
||||
"$ref": "#/$defs/cachedSection"
|
||||
},
|
||||
"load": {
|
||||
"$ref": "#/$defs/cachedSection"
|
||||
},
|
||||
"version": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"time": {
|
||||
"$ref": "#/$defs/timeSection"
|
||||
},
|
||||
"output_style": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
},
|
||||
"hostname": {
|
||||
"$ref": "#/$defs/basicSection"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"custom": {
|
||||
"type": "array",
|
||||
"description": "Custom command sections",
|
||||
"items": {
|
||||
"$ref": "#/$defs/customCommand"
|
||||
},
|
||||
"default": []
|
||||
},
|
||||
"colors": {
|
||||
"type": "object",
|
||||
"description": "Themed color palettes for light/dark modes",
|
||||
"properties": {
|
||||
"dark": { "$ref": "#/$defs/colorPalette" },
|
||||
"light": { "$ref": "#/$defs/colorPalette" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"glyphs": {
|
||||
"type": "object",
|
||||
"description": "Glyph configuration for Nerd Fonts and fallbacks",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Enable Nerd Font glyphs"
|
||||
},
|
||||
"set": {
|
||||
"type": "object",
|
||||
"description": "Nerd Font glyph mappings",
|
||||
"additionalProperties": { "type": "string" }
|
||||
},
|
||||
"fallback": {
|
||||
"type": "object",
|
||||
"description": "ASCII fallback glyphs when Nerd Fonts are disabled",
|
||||
"additionalProperties": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"globalConfig": {
|
||||
"type": "object",
|
||||
"description": "Global settings",
|
||||
"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.",
|
||||
"default": " | "
|
||||
},
|
||||
"justify": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"left",
|
||||
"spread",
|
||||
"space-between"
|
||||
],
|
||||
"description": "How sections distribute across the terminal width. 'left': pack left with fixed separators (flex sections expand). 'spread': distribute gaps evenly across all separators. 'space-between': first section flush left, last flush right, gaps evenly distributed.",
|
||||
"default": "left"
|
||||
},
|
||||
"vcs": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"auto",
|
||||
"git",
|
||||
"jj",
|
||||
"none"
|
||||
],
|
||||
"description": "VCS detection mode",
|
||||
"default": "auto"
|
||||
},
|
||||
"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."
|
||||
},
|
||||
"width_margin": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"default": 4,
|
||||
"description": "Columns to subtract from detected width. Accounts for terminal multiplexer borders (Zellij/tmux) or Claude Code UI chrome that reduce the actual visible area."
|
||||
},
|
||||
"cache_dir": {
|
||||
"type": "string",
|
||||
"description": "Cache directory template. {session_id} is replaced at runtime.",
|
||||
"default": "/tmp/claude-sl-{session_id}"
|
||||
},
|
||||
"responsive": {
|
||||
"type": "boolean",
|
||||
"description": "Enable responsive layout selection based on terminal width",
|
||||
"default": true
|
||||
},
|
||||
"breakpoints": {
|
||||
"type": "object",
|
||||
"description": "Width breakpoints for responsive layout selection",
|
||||
"properties": {
|
||||
"narrow": {
|
||||
"type": "integer",
|
||||
"description": "Width below which 'dense' preset is used",
|
||||
"default": 60
|
||||
},
|
||||
"medium": {
|
||||
"type": "integer",
|
||||
"description": "Width below which 'standard' preset is used (above uses 'verbose')",
|
||||
"default": 100
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"theme": {
|
||||
"type": "string",
|
||||
"enum": ["auto", "dark", "light"],
|
||||
"description": "Color theme. 'auto' detects from terminal.",
|
||||
"default": "auto"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"colorName": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"red",
|
||||
"green",
|
||||
"yellow",
|
||||
"blue",
|
||||
"magenta",
|
||||
"cyan",
|
||||
"white",
|
||||
"dim",
|
||||
"bold"
|
||||
],
|
||||
"description": "Named ANSI color"
|
||||
},
|
||||
"colorPalette": {
|
||||
"type": "object",
|
||||
"description": "Semantic color palette for a theme",
|
||||
"properties": {
|
||||
"success": { "type": "string" },
|
||||
"warning": { "type": "string" },
|
||||
"danger": { "type": "string" },
|
||||
"critical": { "type": "string" },
|
||||
"muted": { "type": "string" },
|
||||
"accent": { "type": "string" },
|
||||
"highlight": { "type": "string" },
|
||||
"info": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"layoutArray": {
|
||||
"type": "array",
|
||||
"description": "Array of lines, each line is an array of section IDs. Use 'spacer' (or '_spacer1', '_spacer2' etc.) as a virtual section that expands to fill remaining width, pushing sections apart.",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1
|
||||
},
|
||||
"minItems": 1,
|
||||
"examples": [
|
||||
[
|
||||
[
|
||||
"model",
|
||||
"provider",
|
||||
"project",
|
||||
"vcs"
|
||||
],
|
||||
[
|
||||
"context_bar",
|
||||
"cost",
|
||||
"duration"
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"priority": {
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
],
|
||||
"description": "Display priority. 1=always show, 2=drop if tight, 3=drop first",
|
||||
"default": 2
|
||||
},
|
||||
"thresholds": {
|
||||
"type": "object",
|
||||
"description": "Threshold values for color transitions",
|
||||
"properties": {
|
||||
"warn": {
|
||||
"type": "number"
|
||||
},
|
||||
"danger": {
|
||||
"type": "number"
|
||||
},
|
||||
"critical": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"basicSection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"vcsSection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"min_width": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"default": 8
|
||||
},
|
||||
"prefer": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"auto",
|
||||
"git",
|
||||
"jj"
|
||||
],
|
||||
"default": "auto",
|
||||
"description": "VCS preference. auto detects .jj/ first, then .git/"
|
||||
},
|
||||
"show_ahead_behind": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"show_dirty": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"ttl": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"branch": {
|
||||
"type": "number",
|
||||
"default": 3
|
||||
},
|
||||
"dirty": {
|
||||
"type": "number",
|
||||
"default": 5
|
||||
},
|
||||
"ahead_behind": {
|
||||
"type": "number",
|
||||
"default": 30
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"beadsSection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"show_wip": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Show current WIP bead ID"
|
||||
},
|
||||
"show_wip_count": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Show count of in-progress beads (medium+ width)"
|
||||
},
|
||||
"show_ready_count": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Show count of ready beads"
|
||||
},
|
||||
"show_open_count": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Show count of open/pending beads (medium+ width)"
|
||||
},
|
||||
"show_closed_count": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Show count of completed beads (wide width only)"
|
||||
},
|
||||
"ttl": {
|
||||
"type": "number",
|
||||
"default": 30
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"contextBarSection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"flex": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"min_width": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"default": 15
|
||||
},
|
||||
"bar_width": {
|
||||
"type": "integer",
|
||||
"minimum": 3,
|
||||
"default": 10
|
||||
},
|
||||
"thresholds": {
|
||||
"$ref": "#/$defs/thresholds"
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"contextUsageSection": {
|
||||
"type": "object",
|
||||
"description": "Shows context usage as 'used/total' (e.g., '125k/200k')",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"capacity": {
|
||||
"type": "integer",
|
||||
"default": 200000,
|
||||
"description": "Context window capacity in tokens. Used when max_tokens is not provided by Claude Code."
|
||||
},
|
||||
"thresholds": {
|
||||
"$ref": "#/$defs/thresholds"
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"tokensRawSection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"format": {
|
||||
"type": "string",
|
||||
"default": "{input} in/{output} out",
|
||||
"description": "Format template. {input} and {output} are replaced."
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"costSection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"thresholds": {
|
||||
"$ref": "#/$defs/thresholds"
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"toolsSection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"min_width": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"default": 6
|
||||
},
|
||||
"show_last_name": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"ttl": {
|
||||
"type": "number",
|
||||
"default": 2
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"cachedSection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"ttl": {
|
||||
"type": "number"
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"timeSection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"format": {
|
||||
"type": "string",
|
||||
"default": "%H:%M",
|
||||
"description": "strftime format string"
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
},
|
||||
"color": {
|
||||
"$ref": "#/$defs/colorName"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"colorMatch": {
|
||||
"type": "object",
|
||||
"description": "Map of output value to color name",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"red",
|
||||
"green",
|
||||
"yellow",
|
||||
"blue",
|
||||
"magenta",
|
||||
"cyan",
|
||||
"white",
|
||||
"dim",
|
||||
"bold"
|
||||
]
|
||||
}
|
||||
},
|
||||
"customCommand": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"command"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier, used in layout arrays",
|
||||
"pattern": "^[a-z][a-z0-9_-]*$"
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Display label prefix. Defaults to id."
|
||||
},
|
||||
"command": {
|
||||
"type": "string",
|
||||
"description": "Shell command to execute. stdout is captured as the value."
|
||||
},
|
||||
"ttl": {
|
||||
"type": "number",
|
||||
"description": "Cache TTL in seconds",
|
||||
"default": 30
|
||||
},
|
||||
"priority": {
|
||||
"$ref": "#/$defs/priority"
|
||||
},
|
||||
"flex": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"min_width": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"default": 4
|
||||
},
|
||||
"color": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"match": {
|
||||
"$ref": "#/$defs/colorMatch"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"default_color": {
|
||||
"$ref": "#/$defs/colorName",
|
||||
"description": "Default color override. Uses 'default_color' to avoid conflict with 'color.match'."
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"pad": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"align": {
|
||||
"type": "string",
|
||||
"enum": ["left", "right", "center"],
|
||||
"default": "left"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user