diff options
| author | user <user@clank> | 2026-08-20 23:53:43 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-20 23:53:43 +0200 |
| commit | 64db2051192a6a6f5a9333f503d14b1ccccd699d (patch) | |
| tree | f14bdeee8ccbe6f413e20cf2b746ec16f4414ee1 /docs/panes.md | |
| parent | slosh: fold floating panes and the drop grammar into DESIGN.md (diff) | |
| download | slosh-64db2051192a6a6f5a9333f503d14b1ccccd699d.tar.gz slosh-64db2051192a6a6f5a9333f503d14b1ccccd699d.tar.xz slosh-64db2051192a6a6f5a9333f503d14b1ccccd699d.zip | |
slosh: M10c, the memory -- floats survive being written down
A dumped session quietly re-tiled its floats, which was the one data-loss
gap left in D22. dump-layout now records `floating=true x= y= w= h=` -- the
*wanted* rect, because intent is what survives a session and the next
screen's layout clamps it like any frame -- layout files declare the same
(linted: floating is a bool, x/y/w/h mean nothing without it), and a file
whose every pane floats self-heals through ensure_tiled: the top float
lands, the same rule closing the last tiled pane follows, no lint required.
save-workspace inherits all of it from the shared dumper.
`float` over the API takes x/y/w/h and then *places* rather than toggles --
a placement is a statement about where, not about whether -- floating the
pane first when it is tiled, re-placing when it already floats, with
omitted fields meaning "keep". The intent is stored exactly as asked: the
write-back rule is for hands, whose drags need the clamp to agree with the
eye; a script means what it typed.
And kitty graphics respect the stack. The cell compositor gets occlusion
free from paint order, but placements are sent after the diff and would
paint an image straight over a float covering it. Each pane's placements
are now clipped by the float rects above it -- every float for a tiled
pane, the higher-raised for a float -- cropping what one clean edge can
express (the pane-edge source-rectangle arithmetic aimed at another
clipper, including from the top and left, where the source origin moves and
the sub-cell offset is consumed) and suppressing what it cannot: a strip
across the middle or a corner overlap leaves a shape one placement cannot
say, and the image returns whole when the float moves. No z= needed --
clipping is the z-order, since nothing is ever allowed to overlap.
D22's "still owed" paragraph is paid and rewritten; M10 is fully checked.
Diffstat (limited to 'docs/panes.md')
| -rw-r--r-- | docs/panes.md | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/docs/panes.md b/docs/panes.md index d0a6eb3..ac5d242 100644 --- a/docs/panes.md +++ b/docs/panes.md @@ -127,9 +127,18 @@ like any shell, and un-floating lands it beside the pane it was opened over. it comes back floating; zooming fills the tab and returns it on the way out. The last tiled pane cannot float — an overlay needs something to be over — and closing the last tiled pane lands the float in its place. -- Its rect is not yet written by `dump-layout` (coming with the layout-file - support); `{"cmd":"float","id":N}` toggles one and `{"cmd":"new-float"}` - opens one from a [script](scripting.md). +- **It survives being written down.** `dump-layout` and + [`save-workspace`](workspaces.md) record `floating=true x= y= w= h=` — the + *wanted* rect, which the next screen's layout clamps like any frame — and a + [layout file](layouts.md) can declare the same. From a + [script](scripting.md), `{"cmd":"float","id":N}` toggles, + `{"cmd":"float","id":N,"x":10,"y":5,"w":40,"h":12}` places (floats first + if tiled, re-places if floating; omitted fields mean "keep"), and + `{"cmd":"new-float"}` opens one. +- **Images know their place.** A kitty-graphics picture in a pane a float + covers is cropped at the float's edge, or not drawn while the float sits + across its middle — a placement is one rectangle, and it must not paint + over what covers it. ## Links |
