diff options
| author | user <user@clank> | 2026-08-14 19:48:30 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-14 19:48:30 +0200 |
| commit | e021e0d05926fbaae2b53edaf256fdd7b31aff1d (patch) | |
| tree | e841ac08f4b5a241d4013fcfd0a6207eb78e4f43 /config | |
| parent | sl0ppty: zoom a pane, and give the frame buttons for it (diff) | |
| download | slosh-e021e0d05926fbaae2b53edaf256fdd7b31aff1d.tar.gz slosh-e021e0d05926fbaae2b53edaf256fdd7b31aff1d.tar.xz slosh-e021e0d05926fbaae2b53edaf256fdd7b31aff1d.zip | |
sl0ppty: minimise a pane into a strip along the bottom
A pane can be put away: it leaves the layout, becomes one row at the bottom of
the tab, and keeps running. The panes it leaves behind take the space back.
Clicking its row brings it back.
Minimised is intent, so it sits beside the weight on the node rather than with
the rect and the collapsed flag — and layout_node has to be careful not to
clear it the way it clears those, or every frame would undo it. That is the
only sharp edge in the whole thing and it has a comment.
Everything else fell out of rules that already existed. A split divides among
the children that still want space, so a split with one live child is that
child, exactly as a split with one child already was. A minimised leaf returns
from layout_node before its rect is touched, which also skips the floor check —
a pane that is one row by request is not a pane that failed to fit. And the row
itself is drawn by the same code as a collapsed header, because it is the same
thing: a pane you can see the name of and click.
Restoring is not a verb. A focused pane is never minimised, checked once a
frame, so every route that ends with the pane focused restores it — clicking
the row, the control API, and anything added later that moves focus without
knowing minimising exists.
In a tab that has flattened into a list, minimising has no effect at all, which
is what was asked for and also what falls out: every pane down there is already
a row, so there is no second thing for it to be. The strip is not reserved when
it would leave too little above it to be worth looking at; the tab flattens
instead, and arrives at the same place.
Minimising the last visible pane is refused with a toast. A tab showing nothing
has no way back that can be discovered from the tab, and it is not a state
worth being able to reach by accident.
The frame's third button costs another three columns, which is why they are
drawn right to left and stop when they run out: a narrow pane keeps close and
zoom, and loses minimise first.
Diffstat (limited to 'config')
| -rw-r--r-- | config/config.kdl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/config/config.kdl b/config/config.kdl index 3597549..39e185c 100644 --- a/config/config.kdl +++ b/config/config.kdl @@ -40,8 +40,10 @@ title_inset 2 // real choice rather than an oversight. // ── the frame's own buttons ───────────────────────────────────────────────── // -// Zoom and close, in the top-right of every pane's frame. Three columns each, -// because a one-column target is a thing you miss with a mouse. +// Minimise, zoom and close, in the top-right of every pane's frame. Three +// columns each, because a one-column target is a thing you miss with a mouse. +// They are drawn right to left and stop when they run out of room, so a narrow +// pane keeps close and zoom and loses minimise first. // // The split button was removed from this frame once already, on the grounds // that one glyph cannot mean four directions and the border can. These are two @@ -57,6 +59,7 @@ pane_buttons true zoom_mark "□" zoom_on_mark "▣" close_mark "×" +min_mark "–" bell_indicator true @@ -288,7 +291,7 @@ theme { // Actions: split-cols split-rows close-pane focus-left focus-right focus-up // focus-down focus-next resize-left resize-right resize-up resize-down // scroll-up scroll-down scroll-page-up scroll-page-down scroll-top -// scroll-bottom zoom new-tab next-tab prev-tab select-tab-1..9 finder detach quit +// scroll-bottom zoom minimize new-tab next-tab prev-tab select-tab-1..9 finder detach quit // literal-prefix none keys { @@ -298,6 +301,7 @@ keys { bind "-" "split-rows" bind "x" "close-pane" bind "z" "zoom" + bind "m" "minimize" bind "h" "focus-left" bind "l" "focus-right" |
