feat(wm): layouts

Every workspace started in BSP and stayed there. `komorebic change-layout` gives
the focused workspace one of the layouts of komorebi-layouts, `cycle-layout
next|previous` steps through them, and `flip-layout` mirrors the tiles along an
axis, on top of the flip there is. A flip mirrors the tiles, not the order of
the containers, and the directions of focus and move are flipped with it, so
`focus left` still goes to the tile on the left.

`toggle-tiling` turns the tiling of the focused workspace off and on: while it
is off, no window of the workspace is moved, and the windows that open are taken
in and tiled once it is on again.

`preselect-direction` reserves the place on one side of the focused window for
the next window: an empty container holds it, the layout gives it a tile, and
the next window takes it. `cancel-preselect` gives it back.

A new VM suite, vm-commands, after the spike's m8 script, runs every layout with
five, three, two and one windows against a real KWin with two outputs, and then
every komorebic command there is, checking after each that the daemon is alive,
answers, and has every window KWin has, and that KWin has the windows where the
daemon asked. Every command that comes later adds its line to that sweep.
This commit is contained in:
LGUG2Z committed 2026-10-28 07:20:37 -07:00
1 parent 1bbb534844
commit 41c32aad8e
25 files changed
+1224 -70

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
```text
Cancel a workspace preselect set by the preselect-direction command, if one exists
Usage: cancel-preselect
Options:
-h, --help
Print help
```
+23
View File
@@ -0,0 +1,23 @@
```text
Set the layout on the focused workspace
Usage: change-layout <DEFAULT_LAYOUT>
Arguments:
<DEFAULT_LAYOUT>
Possible values:
- bsp: BSP Layout
- columns: Columns Layout
- rows: Rows Layout
- vertical-stack: Vertical Stack Layout
- horizontal-stack: Horizontal Stack Layout
- ultrawide-vertical-stack: Ultrawide Vertical Stack Layout
- grid: Grid Layout
- right-main-vertical-stack: Right Main Vertical Stack Layout
- scrolling: Scrolling Layout
Options:
-h, --help
Print help (see a summary with '-h')
```
+14
View File
@@ -0,0 +1,14 @@
```text
Cycle between available layouts
Usage: cycle-layout <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```
+17
View File
@@ -0,0 +1,17 @@
```text
Flip the layout on the focused workspace
Usage: flip-layout <AXIS>
Arguments:
<AXIS>
Possible values:
- horizontal: Horizontal axis
- vertical: Vertical axis
- horizontal-and-vertical: Both horizontal and vertical axes
Options:
-h, --help
Print help (see a summary with '-h')
```
+14
View File
@@ -0,0 +1,14 @@
```text
Preselect the specified direction for the next window to be spawned on supported layouts
Usage: preselect-direction <OPERATION_DIRECTION>
Arguments:
<OPERATION_DIRECTION>
[possible values: left, right, up, down]
Options:
-h, --help
Print help
```
+10
View File
@@ -0,0 +1,10 @@
```text
Toggle window tiling on the focused workspace
Usage: toggle-tiling
Options:
-h, --help
Print help
```