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:
271
defaults.json
Normal file
271
defaults.json
Normal file
@@ -0,0 +1,271 @@
|
||||
{
|
||||
"version": 1,
|
||||
"global": {
|
||||
"separator": " | ",
|
||||
"justify": "space-between",
|
||||
"vcs": "auto",
|
||||
"cache_dir": "/tmp/claude-sl-{session_id}",
|
||||
"responsive": true,
|
||||
"breakpoints": {
|
||||
"narrow": 60,
|
||||
"medium": 100
|
||||
},
|
||||
"theme": "auto"
|
||||
},
|
||||
"colors": {
|
||||
"dark": {
|
||||
"success": "green",
|
||||
"warning": "yellow",
|
||||
"danger": "red",
|
||||
"critical": "red bold",
|
||||
"muted": "dim",
|
||||
"accent": "cyan",
|
||||
"highlight": "bold",
|
||||
"info": "blue"
|
||||
},
|
||||
"light": {
|
||||
"success": "green bold",
|
||||
"warning": "yellow bold",
|
||||
"danger": "red bold",
|
||||
"critical": "red bold",
|
||||
"muted": "dim",
|
||||
"accent": "blue",
|
||||
"highlight": "bold",
|
||||
"info": "cyan"
|
||||
}
|
||||
},
|
||||
"glyphs": {
|
||||
"enabled": false,
|
||||
"set": {
|
||||
"separator": "",
|
||||
"separator_alt": "",
|
||||
"branch": "",
|
||||
"dirty": "*",
|
||||
"clean": "✓",
|
||||
"ahead": "↑",
|
||||
"behind": "↓",
|
||||
"folder": "",
|
||||
"clock": "",
|
||||
"dollar": ""
|
||||
},
|
||||
"fallback": {
|
||||
"separator": "|",
|
||||
"separator_alt": "|",
|
||||
"branch": "",
|
||||
"dirty": "*",
|
||||
"clean": "",
|
||||
"ahead": "+",
|
||||
"behind": "-",
|
||||
"folder": "",
|
||||
"clock": "",
|
||||
"dollar": "$"
|
||||
}
|
||||
},
|
||||
"presets": {
|
||||
"standard": [
|
||||
[
|
||||
"model",
|
||||
"provider",
|
||||
"project",
|
||||
"spacer",
|
||||
"vcs"
|
||||
],
|
||||
[
|
||||
"context_bar",
|
||||
"cost",
|
||||
"lines_changed",
|
||||
"duration",
|
||||
"tools"
|
||||
]
|
||||
],
|
||||
"dense": [
|
||||
[
|
||||
"model",
|
||||
"provider",
|
||||
"project",
|
||||
"vcs",
|
||||
"context_bar",
|
||||
"cost",
|
||||
"duration"
|
||||
]
|
||||
],
|
||||
"verbose": [
|
||||
[
|
||||
"model",
|
||||
"provider",
|
||||
"project",
|
||||
"vcs",
|
||||
"beads"
|
||||
],
|
||||
[
|
||||
"context_bar",
|
||||
"tokens_raw",
|
||||
"cache_efficiency",
|
||||
"cost",
|
||||
"cost_velocity"
|
||||
],
|
||||
[
|
||||
"lines_changed",
|
||||
"duration",
|
||||
"tools",
|
||||
"turns",
|
||||
"load",
|
||||
"version"
|
||||
]
|
||||
]
|
||||
},
|
||||
"layout": "verbose",
|
||||
"sections": {
|
||||
"model": {
|
||||
"enabled": true,
|
||||
"priority": 1
|
||||
},
|
||||
"provider": {
|
||||
"enabled": true,
|
||||
"priority": 2
|
||||
},
|
||||
"project": {
|
||||
"enabled": true,
|
||||
"priority": 1,
|
||||
"truncate": {
|
||||
"enabled": true,
|
||||
"max": 30,
|
||||
"style": "middle"
|
||||
}
|
||||
},
|
||||
"vcs": {
|
||||
"enabled": true,
|
||||
"priority": 1,
|
||||
"min_width": 8,
|
||||
"prefer": "auto",
|
||||
"show_ahead_behind": true,
|
||||
"show_dirty": true,
|
||||
"truncate": {
|
||||
"enabled": true,
|
||||
"max": 25,
|
||||
"style": "right"
|
||||
},
|
||||
"ttl": {
|
||||
"branch": 3,
|
||||
"dirty": 5,
|
||||
"ahead_behind": 30
|
||||
}
|
||||
},
|
||||
"beads": {
|
||||
"enabled": true,
|
||||
"priority": 3,
|
||||
"show_wip": true,
|
||||
"show_wip_count": true,
|
||||
"show_ready_count": true,
|
||||
"show_open_count": true,
|
||||
"show_closed_count": true,
|
||||
"ttl": 30
|
||||
},
|
||||
"context_bar": {
|
||||
"enabled": true,
|
||||
"priority": 1,
|
||||
"flex": true,
|
||||
"min_width": 15,
|
||||
"bar_width": 10,
|
||||
"thresholds": {
|
||||
"warn": 50,
|
||||
"danger": 70,
|
||||
"critical": 85
|
||||
}
|
||||
},
|
||||
"context_usage": {
|
||||
"enabled": false,
|
||||
"priority": 2,
|
||||
"capacity": 200000,
|
||||
"thresholds": {
|
||||
"warn": 50,
|
||||
"danger": 70,
|
||||
"critical": 85
|
||||
}
|
||||
},
|
||||
"tokens_raw": {
|
||||
"enabled": true,
|
||||
"priority": 3,
|
||||
"format": "{input} in/{output} out"
|
||||
},
|
||||
"cache_efficiency": {
|
||||
"enabled": true,
|
||||
"priority": 3
|
||||
},
|
||||
"cost": {
|
||||
"enabled": true,
|
||||
"priority": 1,
|
||||
"thresholds": {
|
||||
"warn": 5.00,
|
||||
"danger": 8.00,
|
||||
"critical": 10.00
|
||||
}
|
||||
},
|
||||
"cost_velocity": {
|
||||
"enabled": true,
|
||||
"priority": 3
|
||||
},
|
||||
"token_velocity": {
|
||||
"enabled": false,
|
||||
"priority": 3
|
||||
},
|
||||
"cost_trend": {
|
||||
"enabled": false,
|
||||
"priority": 3,
|
||||
"width": 8
|
||||
},
|
||||
"context_trend": {
|
||||
"enabled": false,
|
||||
"priority": 3,
|
||||
"width": 8,
|
||||
"thresholds": {
|
||||
"warn": 50,
|
||||
"danger": 70,
|
||||
"critical": 85
|
||||
}
|
||||
},
|
||||
"lines_changed": {
|
||||
"enabled": true,
|
||||
"priority": 2
|
||||
},
|
||||
"duration": {
|
||||
"enabled": true,
|
||||
"priority": 2
|
||||
},
|
||||
"tools": {
|
||||
"enabled": true,
|
||||
"priority": 2,
|
||||
"min_width": 6,
|
||||
"show_last_name": true,
|
||||
"ttl": 2
|
||||
},
|
||||
"turns": {
|
||||
"enabled": true,
|
||||
"priority": 3,
|
||||
"ttl": 2
|
||||
},
|
||||
"load": {
|
||||
"enabled": true,
|
||||
"priority": 3,
|
||||
"ttl": 10
|
||||
},
|
||||
"version": {
|
||||
"enabled": false,
|
||||
"priority": 3
|
||||
},
|
||||
"time": {
|
||||
"enabled": false,
|
||||
"priority": 3,
|
||||
"format": "%H:%M"
|
||||
},
|
||||
"output_style": {
|
||||
"enabled": false,
|
||||
"priority": 3
|
||||
},
|
||||
"hostname": {
|
||||
"enabled": true,
|
||||
"priority": 3
|
||||
}
|
||||
},
|
||||
"custom": []
|
||||
}
|
||||
Reference in New Issue
Block a user