config: add create-mark, jump-to-mark, and copy-mark actions
This commit is contained in:
parent
e30e2595a1
commit
eb625b34cc
19 changed files with 1193 additions and 9 deletions
|
|
@ -479,6 +479,60 @@
|
|||
"type",
|
||||
"name"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Creates a mark for the currently focused window.\n\n- Example 1:\n\n This example interactively selects a key that identifies the mark.\n\n ```toml\n [shortcuts]\n alt-x = { type = \"create-mark\" }\n ```\n\n- Example 2:\n\n This example hard-codes a key.\n\n ```toml\n [shortcuts]\n alt-x = { type = \"create-mark\", id.key = \"a\" }\n ```\n",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "create-mark"
|
||||
},
|
||||
"id": {
|
||||
"description": "The identifier of the mark.\n\nIf this field is omitted, the next pressed key identifies the mark.\n",
|
||||
"$ref": "#/$defs/MarkId"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Moves the keyboard focus to a window identified by a mark.\n\n- Example 1:\n\n This example interactively selects a key that identifies the mark.\n\n ```toml\n [shortcuts]\n alt-x = { type = \"jump-to-mark\" }\n ```\n\n- Example 2:\n\n This example hard-codes a key.\n\n ```toml\n [shortcuts]\n alt-x = { type = \"jump-to-mark\", id.key = \"a\" }\n ```\n",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "jump-to-mark"
|
||||
},
|
||||
"id": {
|
||||
"description": "The identifier of the mark.\n\nIf this field is omitted, the next pressed key identifies the mark.\n",
|
||||
"$ref": "#/$defs/MarkId"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Copies a mark.\n\nIf the `src` id identifies a mark before this function is called, the `dst`\nid will identify the same mark afterwards.\n",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "copy-mark"
|
||||
},
|
||||
"src": {
|
||||
"description": "The source id to copy from.",
|
||||
"$ref": "#/$defs/MarkId"
|
||||
},
|
||||
"dst": {
|
||||
"description": "The destination id to copy to.",
|
||||
"$ref": "#/$defs/MarkId"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"src",
|
||||
"dst"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1416,6 +1470,21 @@
|
|||
"error"
|
||||
]
|
||||
},
|
||||
"MarkId": {
|
||||
"description": "Identifies a mark.\n\nExactly one of the fields must be set.\n\n- Example:\n\n ```toml\n [shortcuts]\n alt-x = { type = \"create-mark\", id.key = \"a\" }\n ```\n",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "Identifies a mark by a key press.\n\nThe names of the keys can be found in [1] with the `KEY_` prefix removed. The key\nnames must be written all lowercase.\n\n[1]: https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h\n"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Identifies a mark with an arbitrary string.\n"
|
||||
}
|
||||
},
|
||||
"required": []
|
||||
},
|
||||
"MessageFormat": {
|
||||
"type": "string",
|
||||
"description": "A message format used by status programs.",
|
||||
|
|
@ -1621,7 +1690,9 @@
|
|||
"focus-next",
|
||||
"focus-below",
|
||||
"focus-above",
|
||||
"focus-tiles"
|
||||
"focus-tiles",
|
||||
"create-mark",
|
||||
"jump-to-mark"
|
||||
]
|
||||
},
|
||||
"Status": {
|
||||
|
|
|
|||
|
|
@ -671,6 +671,91 @@ This table is a tagged union. The variant is determined by the `type` field. It
|
|||
|
||||
The value of this field should be a string.
|
||||
|
||||
- `create-mark`:
|
||||
|
||||
Creates a mark for the currently focused window.
|
||||
|
||||
- Example 1:
|
||||
|
||||
This example interactively selects a key that identifies the mark.
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-x = { type = "create-mark" }
|
||||
```
|
||||
|
||||
- Example 2:
|
||||
|
||||
This example hard-codes a key.
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-x = { type = "create-mark", id.key = "a" }
|
||||
```
|
||||
|
||||
The table has the following fields:
|
||||
|
||||
- `id` (optional):
|
||||
|
||||
The identifier of the mark.
|
||||
|
||||
If this field is omitted, the next pressed key identifies the mark.
|
||||
|
||||
The value of this field should be a [MarkId](#types-MarkId).
|
||||
|
||||
- `jump-to-mark`:
|
||||
|
||||
Moves the keyboard focus to a window identified by a mark.
|
||||
|
||||
- Example 1:
|
||||
|
||||
This example interactively selects a key that identifies the mark.
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-x = { type = "jump-to-mark" }
|
||||
```
|
||||
|
||||
- Example 2:
|
||||
|
||||
This example hard-codes a key.
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-x = { type = "jump-to-mark", id.key = "a" }
|
||||
```
|
||||
|
||||
The table has the following fields:
|
||||
|
||||
- `id` (optional):
|
||||
|
||||
The identifier of the mark.
|
||||
|
||||
If this field is omitted, the next pressed key identifies the mark.
|
||||
|
||||
The value of this field should be a [MarkId](#types-MarkId).
|
||||
|
||||
- `copy-mark`:
|
||||
|
||||
Copies a mark.
|
||||
|
||||
If the `src` id identifies a mark before this function is called, the `dst`
|
||||
id will identify the same mark afterwards.
|
||||
|
||||
The table has the following fields:
|
||||
|
||||
- `src` (required):
|
||||
|
||||
The source id to copy from.
|
||||
|
||||
The value of this field should be a [MarkId](#types-MarkId).
|
||||
|
||||
- `dst` (required):
|
||||
|
||||
The destination id to copy to.
|
||||
|
||||
The value of this field should be a [MarkId](#types-MarkId).
|
||||
|
||||
|
||||
<a name="types-Brightness"></a>
|
||||
### `Brightness`
|
||||
|
|
@ -3071,6 +3156,42 @@ The string should have one of the following values:
|
|||
|
||||
|
||||
|
||||
<a name="types-MarkId"></a>
|
||||
### `MarkId`
|
||||
|
||||
Identifies a mark.
|
||||
|
||||
Exactly one of the fields must be set.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-x = { type = "create-mark", id.key = "a" }
|
||||
```
|
||||
|
||||
Values of this type should be tables.
|
||||
|
||||
The table has the following fields:
|
||||
|
||||
- `key` (optional):
|
||||
|
||||
Identifies a mark by a key press.
|
||||
|
||||
The names of the keys can be found in [1] with the `KEY_` prefix removed. The key
|
||||
names must be written all lowercase.
|
||||
|
||||
[1]: https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h
|
||||
|
||||
The value of this field should be a string.
|
||||
|
||||
- `name` (optional):
|
||||
|
||||
Identifies a mark with an arbitrary string.
|
||||
|
||||
The value of this field should be a string.
|
||||
|
||||
|
||||
<a name="types-MessageFormat"></a>
|
||||
### `MessageFormat`
|
||||
|
||||
|
|
@ -3697,6 +3818,18 @@ The string should have one of the following values:
|
|||
|
||||
Focuses the tile layer.
|
||||
|
||||
- `create-mark`:
|
||||
|
||||
Interactively creates a mark.
|
||||
|
||||
The next pressed key becomes the identifier for the mark.
|
||||
|
||||
- `jump-to-mark`:
|
||||
|
||||
Interactively jumps to a mark.
|
||||
|
||||
The next pressed key identifies the mark to jump to.
|
||||
|
||||
|
||||
|
||||
<a name="types-Status"></a>
|
||||
|
|
|
|||
|
|
@ -602,6 +602,79 @@ Action:
|
|||
kind: string
|
||||
description: The name of the action.
|
||||
required: true
|
||||
create-mark:
|
||||
description: |
|
||||
Creates a mark for the currently focused window.
|
||||
|
||||
- Example 1:
|
||||
|
||||
This example interactively selects a key that identifies the mark.
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-x = { type = "create-mark" }
|
||||
```
|
||||
|
||||
- Example 2:
|
||||
|
||||
This example hard-codes a key.
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-x = { type = "create-mark", id.key = "a" }
|
||||
```
|
||||
fields:
|
||||
id:
|
||||
description: |
|
||||
The identifier of the mark.
|
||||
|
||||
If this field is omitted, the next pressed key identifies the mark.
|
||||
required: false
|
||||
ref: MarkId
|
||||
jump-to-mark:
|
||||
description: |
|
||||
Moves the keyboard focus to a window identified by a mark.
|
||||
|
||||
- Example 1:
|
||||
|
||||
This example interactively selects a key that identifies the mark.
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-x = { type = "jump-to-mark" }
|
||||
```
|
||||
|
||||
- Example 2:
|
||||
|
||||
This example hard-codes a key.
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-x = { type = "jump-to-mark", id.key = "a" }
|
||||
```
|
||||
fields:
|
||||
id:
|
||||
description: |
|
||||
The identifier of the mark.
|
||||
|
||||
If this field is omitted, the next pressed key identifies the mark.
|
||||
required: false
|
||||
ref: MarkId
|
||||
copy-mark:
|
||||
description: |
|
||||
Copies a mark.
|
||||
|
||||
If the `src` id identifies a mark before this function is called, the `dst`
|
||||
id will identify the same mark afterwards.
|
||||
fields:
|
||||
src:
|
||||
description: The source id to copy from.
|
||||
required: true
|
||||
ref: MarkId
|
||||
dst:
|
||||
description: The destination id to copy to.
|
||||
required: true
|
||||
ref: MarkId
|
||||
|
||||
|
||||
Exec:
|
||||
|
|
@ -870,6 +943,16 @@ SimpleActionName:
|
|||
description: Focuses the layer above the currently focused layer.
|
||||
- value: focus-tiles
|
||||
description: Focuses the tile layer.
|
||||
- value: create-mark
|
||||
description: |
|
||||
Interactively creates a mark.
|
||||
|
||||
The next pressed key becomes the identifier for the mark.
|
||||
- value: jump-to-mark
|
||||
description: |
|
||||
Interactively jumps to a mark.
|
||||
|
||||
The next pressed key identifies the mark to jump to.
|
||||
|
||||
|
||||
Color:
|
||||
|
|
@ -3779,3 +3862,34 @@ FocusHistory:
|
|||
The default is `false`.
|
||||
kind: boolean
|
||||
required: false
|
||||
|
||||
|
||||
MarkId:
|
||||
kind: table
|
||||
description: |
|
||||
Identifies a mark.
|
||||
|
||||
Exactly one of the fields must be set.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
[shortcuts]
|
||||
alt-x = { type = "create-mark", id.key = "a" }
|
||||
```
|
||||
fields:
|
||||
key:
|
||||
description: |
|
||||
Identifies a mark by a key press.
|
||||
|
||||
The names of the keys can be found in [1] with the `KEY_` prefix removed. The key
|
||||
names must be written all lowercase.
|
||||
|
||||
[1]: https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h
|
||||
kind: string
|
||||
required: false
|
||||
name:
|
||||
description: |
|
||||
Identifies a mark with an arbitrary string.
|
||||
kind: string
|
||||
required: false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue