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/scripting.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/scripting.md')
| -rw-r--r-- | docs/scripting.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/scripting.md b/docs/scripting.md index 0074782..193f46a 100644 --- a/docs/scripting.md +++ b/docs/scripting.md @@ -33,6 +33,8 @@ Panes and tabs are addressed by **id**, so a background tab is scriptable. | `new-tab` `select-tab` `close-tab` `move-tab` `set-name` | tabs, by `id` or `index` | | `set-name target="pane"` | a pane's name, which outranks the title its program sets | | `move-pane` | `id` of the pane, `tab` id to move it into (`0` for a tab of its own, with an optional `name`), `dir:"cols"\|"rows"`. The pane keeps running — same pty, same scrollback | +| `float` | bare: toggle a pane [floating](panes.md#floating-a-pane) (`id`, or 0 for the focused one). With any of `x` `y` `w` `h` it *places*: floats first when tiled, re-places when floating, never un-floats; omitted fields keep their value | +| `new-float` | a fresh floating shell over the current tab, centred, in the focused pane's directory; answers `id` | | `set-name` | `target:"tab"` (the default, because that is what this verb has always meant) or `"pane"`, `id`, `name`. A pane accepts 0 for the focused one. A pane's name wins over the title the program sets, so this is how a program that keeps announcing something stale gets overruled; an empty `name` clears it and hands the label back. Refusals say `no such pane` or `no such tab`, so a mistyped target is visible in the reply | | `set-purpose` | `target:"pane"\|"tab"`, `id` (or 0 for the focused pane, and the tab you are in), `purpose`. An empty `purpose` clears the slot *and* unlocks it, handing the label back to the program — a lock held over an empty string was a state nothing could get out of | | `dump-layout` `apply-layout` | see [layouts](layouts.md). `dump-layout` takes `tab` (0 for every tab), `relative_to` to write every `cwd=` under that directory instead of absolute, and `suspend` (`as-is` `none` `commands` `all`); it answers `kdl` `panes` `suspended`, and an unknown `tab` is an error rather than an empty document | |
