1
0
Fork 0
forked from wry/wry

config: add move-to-output action

This commit is contained in:
Julian Orth 2024-03-17 13:37:00 +01:00
parent 2a517f437a
commit fecfd24ba0
15 changed files with 357 additions and 76 deletions

View file

@ -136,6 +136,27 @@
"name"
]
},
{
"description": "Moves a workspace to a different output.\n\n- Example 1:\n\n ```toml\n [shortcuts]\n alt-F1 = { type = \"move-to-output\", workspace = \"1\", output.name = \"right\" }\n ```\n\n- Example 2:\n\n ```toml\n [shortcuts]\n alt-F1 = { type = \"move-to-output\", output.name = \"right\" }\n ```\n",
"type": "object",
"properties": {
"type": {
"const": "move-to-output"
},
"workspace": {
"type": "string",
"description": "The name of the workspace.\n\nIf this is omitted, the currently active workspace is moved.\n"
},
"output": {
"description": "The output to move to.\n\nIf multiple outputs match, the workspace is moved to the first matching\noutput.\n",
"$ref": "#/$defs/OutputMatch"
}
},
"required": [
"type",
"output"
]
},
{
"description": "Applies a configuration to connectors.\n\n- Example:\n\n ```toml\n [shortcuts]\n alt-j = { type = \"configure-connector\", connector = { match.name = \"eDP-1\", enabled = false } }\n alt-k = { type = \"configure-connector\", connector = { match.name = \"eDP-1\", enabled = true } }\n ```\n",
"type": "object",

View file

@ -214,6 +214,43 @@ This table is a tagged union. The variant is determined by the `type` field. It
The value of this field should be a string.
- `move-to-output`:
Moves a workspace to a different output.
- Example 1:
```toml
[shortcuts]
alt-F1 = { type = "move-to-output", workspace = "1", output.name = "right" }
```
- Example 2:
```toml
[shortcuts]
alt-F1 = { type = "move-to-output", output.name = "right" }
```
The table has the following fields:
- `workspace` (optional):
The name of the workspace.
If this is omitted, the currently active workspace is moved.
The value of this field should be a string.
- `output` (required):
The output to move to.
If multiple outputs match, the workspace is moved to the first matching
output.
The value of this field should be a [OutputMatch](#types-OutputMatch).
- `configure-connector`:
Applies a configuration to connectors.

View file

@ -219,6 +219,39 @@ Action:
description: The name of the workspace.
required: true
kind: string
move-to-output:
description: |
Moves a workspace to a different output.
- Example 1:
```toml
[shortcuts]
alt-F1 = { type = "move-to-output", workspace = "1", output.name = "right" }
```
- Example 2:
```toml
[shortcuts]
alt-F1 = { type = "move-to-output", output.name = "right" }
```
fields:
workspace:
description: |
The name of the workspace.
If this is omitted, the currently active workspace is moved.
required: false
kind: string
output:
description: |
The output to move to.
If multiple outputs match, the workspace is moved to the first matching
output.
required: true
ref: OutputMatch
configure-connector:
description: |
Applies a configuration to connectors.