1
0
Fork 0
forked from wry/wry

config: add resize action

This commit is contained in:
Julian Orth 2026-03-20 17:25:48 +01:00
parent 15c157b7a6
commit a1905ab971
14 changed files with 344 additions and 264 deletions

View file

@ -608,6 +608,34 @@
"type",
"name"
]
},
{
"description": "Resizes the focused window.\n\n- Example (Growing the window by 2 pixels on the left):\n\n ```toml\n [shortcuts]\n alt-x = { type = \"resize\", dx1 = -2 }\n ```\n\n- Example (Moving the window 2 pixels to the left):\n\n ```toml\n [shortcuts]\n alt-x = { type = \"resize\", dx1 = -2, dx2 = -2 }\n ```\n",
"type": "object",
"properties": {
"type": {
"const": "resize"
},
"dx1": {
"type": "integer",
"description": "The change at the left edge of the window."
},
"dy1": {
"type": "integer",
"description": "The change at the top edge of the window."
},
"dx2": {
"type": "integer",
"description": "The change at the right edge of the window."
},
"dy2": {
"type": "integer",
"description": "The change at the bottom edge of the window."
}
},
"required": [
"type"
]
}
]
}

View file

@ -889,6 +889,58 @@ This table is a tagged union. The variant is determined by the `type` field. It
The value of this field should be a string.
- `resize`:
Resizes the focused window.
- Example (Growing the window by 2 pixels on the left):
```toml
[shortcuts]
alt-x = { type = "resize", dx1 = -2 }
```
- Example (Moving the window 2 pixels to the left):
```toml
[shortcuts]
alt-x = { type = "resize", dx1 = -2, dx2 = -2 }
```
The table has the following fields:
- `dx1` (optional):
The change at the left edge of the window.
The value of this field should be a number.
The numbers should be integers.
- `dy1` (optional):
The change at the top edge of the window.
The value of this field should be a number.
The numbers should be integers.
- `dx2` (optional):
The change at the right edge of the window.
The value of this field should be a number.
The numbers should be integers.
- `dy2` (optional):
The change at the bottom edge of the window.
The value of this field should be a number.
The numbers should be integers.
<a name="types-BarPosition"></a>
### `BarPosition`

View file

@ -851,6 +851,44 @@ Action:
description: The name of the output.
required: true
kind: string
resize:
description: |
Resizes the focused window.
- Example (Growing the window by 2 pixels on the left):
```toml
[shortcuts]
alt-x = { type = "resize", dx1 = -2 }
```
- Example (Moving the window 2 pixels to the left):
```toml
[shortcuts]
alt-x = { type = "resize", dx1 = -2, dx2 = -2 }
```
fields:
dx1:
description: The change at the left edge of the window.
required: false
kind: number
integer_only: true
dy1:
description: The change at the top edge of the window.
required: false
kind: number
integer_only: true
dx2:
description: The change at the right edge of the window.
required: false
kind: number
integer_only: true
dy2:
description: The change at the bottom edge of the window.
required: false
kind: number
integer_only: true
Exec: