feat: implement scratchpad window toggling
This commit is contained in:
parent
5c2f631fdb
commit
d756c8a6a2
17 changed files with 515 additions and 3 deletions
|
|
@ -162,6 +162,38 @@
|
|||
"name"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Sends the currently focused window to a scratchpad and hides it.\n\nIf `name` is omitted, the default scratchpad is used.\n\n- Example:\n\n ```toml\n [shortcuts]\n alt-shift-minus = { type = \"send-to-scratchpad\", name = \"terminal\" }\n ```\n",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "send-to-scratchpad"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the scratchpad."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Toggles a scratchpad.\n\nIf the scratchpad has a visible window, that window is hidden. Otherwise, the\nmost recently hidden window in the scratchpad is shown on the current workspace.\nIf `name` is omitted, the default scratchpad is used.\n\n- Example:\n\n ```toml\n [shortcuts]\n alt-minus = { type = \"toggle-scratchpad\", name = \"terminal\" }\n ```\n",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "toggle-scratchpad"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the scratchpad."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Moves a workspace to a different output.\n\n- Example 1: Move a specific workspace to a named output\n\n ```toml\n [shortcuts]\n alt-F1 = { type = \"move-to-output\", workspace = \"1\", output.name = \"right\" }\n ```\n\n- Example 2: Move the current workspace to a named output\n\n ```toml\n [shortcuts]\n alt-F1 = { type = \"move-to-output\", output.name = \"right\" }\n ```\n\n- Example 3: Move the current workspace to the output on the right (directional)\n\n ```toml\n [shortcuts]\n \"logo+ctrl+shift+Right\" = { type = \"move-to-output\", direction = \"right\" }\n \"logo+ctrl+shift+Left\" = { type = \"move-to-output\", direction = \"left\" }\n \"logo+ctrl+shift+Up\" = { type = \"move-to-output\", direction = \"up\" }\n \"logo+ctrl+shift+Down\" = { type = \"move-to-output\", direction = \"down\" }\n ```\n",
|
||||
"type": "object",
|
||||
|
|
@ -2078,6 +2110,8 @@
|
|||
"toggle-fullscreen",
|
||||
"enter-fullscreen",
|
||||
"exit-fullscreen",
|
||||
"send-to-scratchpad",
|
||||
"toggle-scratchpad",
|
||||
"focus-parent",
|
||||
"close",
|
||||
"disable-pointer-constraint",
|
||||
|
|
|
|||
|
|
@ -286,6 +286,50 @@ This table is a tagged union. The variant is determined by the `type` field. It
|
|||
|
||||
The value of this field should be a string.
|
||||
|
||||
- `send-to-scratchpad`:
|
||||
|
||||
Sends the currently focused window to a scratchpad and hides it.
|
||||
|
||||
If `name` is omitted, the default scratchpad is used.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-shift-minus = { type = "send-to-scratchpad", name = "terminal" }
|
||||
```
|
||||
|
||||
The table has the following fields:
|
||||
|
||||
- `name` (optional):
|
||||
|
||||
The name of the scratchpad.
|
||||
|
||||
The value of this field should be a string.
|
||||
|
||||
- `toggle-scratchpad`:
|
||||
|
||||
Toggles a scratchpad.
|
||||
|
||||
If the scratchpad has a visible window, that window is hidden. Otherwise, the
|
||||
most recently hidden window in the scratchpad is shown on the current workspace.
|
||||
If `name` is omitted, the default scratchpad is used.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-minus = { type = "toggle-scratchpad", name = "terminal" }
|
||||
```
|
||||
|
||||
The table has the following fields:
|
||||
|
||||
- `name` (optional):
|
||||
|
||||
The name of the scratchpad.
|
||||
|
||||
The value of this field should be a string.
|
||||
|
||||
- `move-to-output`:
|
||||
|
||||
Moves a workspace to a different output.
|
||||
|
|
@ -1007,6 +1051,7 @@ The string should have one of the following values:
|
|||
supported plan exists.
|
||||
|
||||
|
||||
|
||||
<a name="types-Animations"></a>
|
||||
### `Animations`
|
||||
|
||||
|
|
@ -4649,6 +4694,14 @@ The string should have one of the following values:
|
|||
|
||||
Makes the currently focused window windowed.
|
||||
|
||||
- `send-to-scratchpad`:
|
||||
|
||||
Sends the currently focused window to the default scratchpad.
|
||||
|
||||
- `toggle-scratchpad`:
|
||||
|
||||
Toggles the default scratchpad.
|
||||
|
||||
- `focus-parent`:
|
||||
|
||||
Focus the parent of the currently focused window.
|
||||
|
|
|
|||
|
|
@ -345,6 +345,42 @@ Action:
|
|||
description: The name of the workspace.
|
||||
required: true
|
||||
kind: string
|
||||
send-to-scratchpad:
|
||||
description: |
|
||||
Sends the currently focused window to a scratchpad and hides it.
|
||||
|
||||
If `name` is omitted, the default scratchpad is used.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-shift-minus = { type = "send-to-scratchpad", name = "terminal" }
|
||||
```
|
||||
fields:
|
||||
name:
|
||||
description: The name of the scratchpad.
|
||||
required: false
|
||||
kind: string
|
||||
toggle-scratchpad:
|
||||
description: |
|
||||
Toggles a scratchpad.
|
||||
|
||||
If the scratchpad has a visible window, that window is hidden. Otherwise, the
|
||||
most recently hidden window in the scratchpad is shown on the current workspace.
|
||||
If `name` is omitted, the default scratchpad is used.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-minus = { type = "toggle-scratchpad", name = "terminal" }
|
||||
```
|
||||
fields:
|
||||
name:
|
||||
description: The name of the scratchpad.
|
||||
required: false
|
||||
kind: string
|
||||
move-to-output:
|
||||
description: |
|
||||
Moves a workspace to a different output.
|
||||
|
|
@ -1076,6 +1112,10 @@ SimpleActionName:
|
|||
description: Makes the currently focused window fullscreen.
|
||||
- value: exit-fullscreen
|
||||
description: Makes the currently focused window windowed.
|
||||
- value: send-to-scratchpad
|
||||
description: Sends the currently focused window to the default scratchpad.
|
||||
- value: toggle-scratchpad
|
||||
description: Toggles the default scratchpad.
|
||||
- value: focus-parent
|
||||
description: Focus the parent of the currently focused window.
|
||||
- value: close
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue