feat(wm): padding and work-area offsets

Every workspace was tiled with the default padding of 5 pixels around and
between its tiles, and the work area offsets could not be set. The padding
commands set a workspace's own workspace padding and container padding, by the
indices of its monitor and itself or for the focused workspace, and the adjust
commands make the focused workspace's larger or smaller.

`global-work-area-offset`, `monitor-work-area-offset` and
`workspace-work-area-offset` keep a part of the work area free of tiles, and a
workspace's offset now wins over its monitor's, which wins over the global one.
A monitor's window-based offset applies while the workspace in front has no more
windows than the monitor's limit, and `toggle-window-based-work-area-offset`
turns it off and on for the focused workspace.

The vm-commands sweep sets and resets every offset and padding.
This commit is contained in:
LGUG2Z committed 2026-10-28 07:20:37 -07:00
1 parent 56294e1cd3
commit c95be9391e
24 files changed
+1083 -15

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
```text
Adjust container padding on the focused workspace
Usage: adjust-container-padding <SIZING> <ADJUSTMENT>
Arguments:
<SIZING>
Possible values:
- increase: Increase
- decrease: Decrease
<ADJUSTMENT>
Pixels to adjust by as an integer
Options:
-h, --help
Print help (see a summary with '-h')
```
+19
View File
@@ -0,0 +1,19 @@
```text
Adjust workspace padding on the focused workspace
Usage: adjust-workspace-padding <SIZING> <ADJUSTMENT>
Arguments:
<SIZING>
Possible values:
- increase: Increase
- decrease: Decrease
<ADJUSTMENT>
Pixels to adjust by as an integer
Options:
-h, --help
Print help (see a summary with '-h')
```
+20
View File
@@ -0,0 +1,20 @@
```text
Set the container padding for the specified workspace
Usage: container-padding <MONITOR> <WORKSPACE> <SIZE>
Arguments:
<MONITOR>
Monitor index (zero-indexed)
<WORKSPACE>
Workspace index on the specified monitor (zero-indexed)
<SIZE>
Pixels to pad with as an integer
Options:
-h, --help
Print help
```
@@ -0,0 +1,14 @@
```text
Set container padding on the focused workspace
Usage: focused-workspace-container-padding <SIZE>
Arguments:
<SIZE>
Pixels size to set as an integer
Options:
-h, --help
Print help
```
+14
View File
@@ -0,0 +1,14 @@
```text
Set workspace padding on the focused workspace
Usage: focused-workspace-padding <SIZE>
Arguments:
<SIZE>
Pixels size to set as an integer
Options:
-h, --help
Print help
```
+23
View File
@@ -0,0 +1,23 @@
```text
Set offsets to exclude parts of the work area from tiling
Usage: global-work-area-offset <LEFT> <TOP> <RIGHT> <BOTTOM>
Arguments:
<LEFT>
Size of the left work area offset (set right to left * 2 to maintain right padding)
<TOP>
Size of the top work area offset (set bottom to the same value to maintain bottom padding)
<RIGHT>
Size of the right work area offset
<BOTTOM>
Size of the bottom work area offset
Options:
-h, --help
Print help
```
+26
View File
@@ -0,0 +1,26 @@
```text
Set offsets for a monitor to exclude parts of the work area from tiling
Usage: monitor-work-area-offset <MONITOR> <LEFT> <TOP> <RIGHT> <BOTTOM>
Arguments:
<MONITOR>
Monitor index (zero-indexed)
<LEFT>
Size of the left work area offset (set right to left * 2 to maintain right padding)
<TOP>
Size of the top work area offset (set bottom to the same value to maintain bottom padding)
<RIGHT>
Size of the right work area offset
<BOTTOM>
Size of the bottom work area offset
Options:
-h, --help
Print help
```
@@ -0,0 +1,10 @@
```text
Toggle application of the window-based work area offset for the focused workspace
Usage: toggle-window-based-work-area-offset
Options:
-h, --help
Print help
```
+20
View File
@@ -0,0 +1,20 @@
```text
Set the workspace padding for the specified workspace
Usage: workspace-padding <MONITOR> <WORKSPACE> <SIZE>
Arguments:
<MONITOR>
Monitor index (zero-indexed)
<WORKSPACE>
Workspace index on the specified monitor (zero-indexed)
<SIZE>
Pixels to pad with as an integer
Options:
-h, --help
Print help
```
+29
View File
@@ -0,0 +1,29 @@
```text
Set offsets for a workspace to exclude parts of the work area from tiling
Usage: workspace-work-area-offset <MONITOR> <WORKSPACE> <LEFT> <TOP> <RIGHT> <BOTTOM>
Arguments:
<MONITOR>
Monitor index (zero-indexed)
<WORKSPACE>
Workspace index (zero-indexed)
<LEFT>
Size of the left work area offset (set right to left * 2 to maintain right padding)
<TOP>
Size of the top work area offset (set bottom to the same value to maintain bottom padding)
<RIGHT>
Size of the right work area offset
<BOTTOM>
Size of the bottom work area offset
Options:
-h, --help
Print help
```