feat(config-toggle): adaptive width, centering, and resize handling #50
Reference in New Issue
Block a user
Delete Branch "feat/config-toggle-adaptive-width"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
$COLUMNS(52, 70, 74, or 78 chars wide), with a 6-column buffer on each side before stepping up — ensures the box never crowds the terminal edgesls→eza, cat→bat, cd→zoxide, rm→trashat 74-wide vscmd shadowsat 52-wide)(COLUMNS - box_width) / 2on every draw; rerenders automatically on resizestty min 1 time 1(blocks forever) tomin 0 time 3(0.3 s poll); event loop detects$COLUMNSchange and redraws without requiring a keypress\e[14A\e[Jwith a formula —⌊(last_cols + 78) / 2⌋ / COLUMNSgives the wrap factor so panels drawn on a wider terminal are fully cleared after the terminal narrows, eliminating ghost linesFiles changed
functions/__config_toggle_draw.fishfunctions/__config_toggle_read_key.fishmin 0 time 3for timeout-based pollingfunctions/config-toggle.fishlast_colstracking, skip-on-idle-timeout, wrap-aware erasedocs/fish-config.mdREADME.mdconfig-toggleblurb with width/centering/resize infoManual Verification
config-togglein a terminal ≥ 90 columns wide — panel should be 78-wide and centeredh/j/k/l, Tab, andq— all behave as before