aboutsummaryrefslogtreecommitdiffstats
path: root/sl0ppij/README.md
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-08 23:11:13 +0200
committeruser <user@clank>2026-08-12 19:34:19 +0200
commit5d5774ae3c6eefc3dbf754ca451d5c3909131cd3 (patch)
tree28471b2167de9b4d423cb59d2136007da2b7b19a /sl0ppij/README.md
parentsl0p: optionally hide the 'Pane #N' placeholder title (diff)
downloadsl0ppi-5d5774ae3c6eefc3dbf754ca451d5c3909131cd3.tar.gz
sl0ppi-5d5774ae3c6eefc3dbf754ca451d5c3909131cd3.tar.xz
sl0ppi-5d5774ae3c6eefc3dbf754ca451d5c3909131cd3.zip
sl0p: rearrange tiled panes by dragging their title bar
Dragging a tiled pane by its title bar and dropping it on another pane swaps the two. Previously the only way to rearrange panes was MOVE mode. The underlying operation already existed: the directional move_pane_* functions are all the same geometry swap, differing only in how they pick the other pane. Extracted as TiledPanes::swap_panes(a, b) so a pane can be swapped with an arbitrary target - the one a drag was dropped onto - which also de-duplicates what was four copies of the same swap. Gesture: the title row EXCLUDING its corners. Corners stay resize handles, so two-axis resize from the top is preserved. Plain top-edge resize is gone and costs nothing: every boundary is shared, so the boundary above a pane is the bottom edge of the pane above and can be dragged from there. A pane at the top of the viewport has the screen edge above it, which was never resizable. Ordering in determine_mouse_action matters three ways: - an in-progress drag is checked FIRST, so motion cannot be reinterpreted as text selection or a resize; - the drag check sits AFTER the double-click check, so the second click of a rename is not swallowed; - and BEFORE the resize branch, which would otherwise claim the title row. Two behaviours had to be preserved deliberately: - Dropping a pane on itself is a no-op, which is what keeps a plain click and a double-click working on the title bar. - Starting a drag focuses the pane. Pressing a title used to start a resize, which focused it as a side effect; without this a plain click on the title would do nothing at all. Stacked panes are excluded from the handle. Their title row is the affordance for focusing/expanding a stack member, and intercepting it broke focus_stacked_pane_under_flexible_pane_with_the_mouse - caught by the suite, not by hand. Baselines held: zellij-server 1440/30 (the 30 are pre-existing).
Diffstat (limited to 'sl0ppij/README.md')
-rw-r--r--sl0ppij/README.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/sl0ppij/README.md b/sl0ppij/README.md
index 198a950..0190c97 100644
--- a/sl0ppij/README.md
+++ b/sl0ppij/README.md
@@ -61,6 +61,20 @@ ui {
}
```
+### Drag a pane title to rearrange it
+
+Dragging a tiled pane by its title bar and dropping it on another pane swaps the
+two, so panes can be rearranged with the mouse instead of only through MOVE mode.
+
+The title bar EXCLUDING its corners is the move handle; the corners remain resize
+handles, so two-axis resize from the top still works. Plain top-edge resize is gone,
+which costs nothing in practice: every boundary is shared, so the boundary above a
+pane is the bottom edge of the pane above it and can be dragged from there.
+
+Dropping a pane on itself is a no-op, so a plain click still just focuses, and
+double-click-to-rename still works. Stacked panes are excluded — in a stack the
+title row is how you focus a member.
+
### Double-click a pane title to rename it
Double-clicking the **top edge** of a pane's frame focuses that pane and drops