feat(wm): resize from the CLI

`komorebic resize-edge left|right|up|down increase|decrease` moves one edge of
the focused tile, and `resize-axis` both edges along an axis, by the delta that
`resize-delta` sets (50 pixels to start with; komorebi-layouts moves an edge by
half of it). The neighbors give up the room.

A resize is an adjustment of the container's tile that the workspace keeps, one
per container, and that the layout applies whenever it tiles. Before each
tiling, the workspace clears the parts its layout cannot apply, such as the
height of a column. No tile may end up narrower or shorter than a tenth of the
work area, or than it already is: a resize that would make one so is granted as
far as it can go, not dropped.

`retile` drops the adjustments, and the `RetileWithResizeDimensions` message
tiles with them. `save-resize` and `load-resize` write them to a file and read
them back, and `quick-save-resize` and `quick-load-resize` do the same with one
file in the daemon's temporary directory.

The vm-commands sweep gains every resize command, and the saving and loading.
This commit is contained in:
LGUG2Z committed 2026-10-28 07:20:37 -07:00
1 parent 37b06993d2
commit 95eb4d5039
24 files changed
+1351 -34

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
```text
Load the resize layout dimensions from a file
Usage: load-resize <PATH>
Arguments:
<PATH>
File from which the resize layout dimensions should be loaded
Options:
-h, --help
Print help
```
+10
View File
@@ -0,0 +1,10 @@
```text
Load the last quicksaved resize layout dimensions
Usage: quick-load-resize
Options:
-h, --help
Print help
```
+10
View File
@@ -0,0 +1,10 @@
```text
Quicksave the current resize layout dimensions
Usage: quick-save-resize
Options:
-h, --help
Print help
```
+22
View File
@@ -0,0 +1,22 @@
```text
Resize the focused window or primary column along the specified axis
Usage: resize-axis <AXIS> <SIZING>
Arguments:
<AXIS>
Possible values:
- horizontal: Horizontal axis
- vertical: Vertical axis
- horizontal-and-vertical: Both horizontal and vertical axes
<SIZING>
Possible values:
- increase: Increase
- decrease: Decrease
Options:
-h, --help
Print help (see a summary with '-h')
```
+14
View File
@@ -0,0 +1,14 @@
```text
Set the resize delta (used by resize-edge and resize-axis)
Usage: resize-delta <PIXELS>
Arguments:
<PIXELS>
The delta of pixels by which to increase or decrease window dimensions when resizing
Options:
-h, --help
Print help
```
+19
View File
@@ -0,0 +1,19 @@
```text
Resize the focused window in the specified direction
Usage: resize-edge <EDGE> <SIZING>
Arguments:
<EDGE>
[possible values: left, right, up, down]
<SIZING>
Possible values:
- increase: Increase
- decrease: Decrease
Options:
-h, --help
Print help (see a summary with '-h')
```
+14
View File
@@ -0,0 +1,14 @@
```text
Save the current resize layout dimensions to a file
Usage: save-resize <PATH>
Arguments:
<PATH>
File to which the resize layout dimensions should be saved
Options:
-h, --help
Print help
```