fix: width detection prioritizes dynamic sources over config
Config `width` was position #3 in the detection chain, overriding all dynamic detection (ioctl, process tree, stty, etc). This meant the statusline couldn't adapt to terminal/pane resizes. Now config `width` serves two roles: - Max cap on dynamically detected widths (prevents absurd widths) - Fallback when all dynamic detection methods fail Also adds: - ioctl on stderr (works when stdout is piped) - stdin JSON `terminal_width` field for Claude Code to pass width - Distinct diagnostic sources: config_cap, config_fallback, stdin_json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
28
statusline.json
Normal file
28
statusline.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"$schema": "./schema.json",
|
||||
"global": {
|
||||
"justify": "spread",
|
||||
"theme": "dark",
|
||||
"responsive": true,
|
||||
"width": 500,
|
||||
"width_margin": 20
|
||||
},
|
||||
"glyphs": {
|
||||
"enabled": true
|
||||
},
|
||||
"layout": "verbose",
|
||||
"sections": {
|
||||
"context_usage": {
|
||||
"enabled": true
|
||||
},
|
||||
"context_trend": {
|
||||
"enabled": true
|
||||
},
|
||||
"cost_trend": {
|
||||
"enabled": true
|
||||
},
|
||||
"load": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user