1
0
Fork 0
forked from wry/wry

seat: add focus history

This commit is contained in:
Julian Orth 2025-07-18 20:09:34 +02:00
parent 9941263a82
commit d12234b38b
21 changed files with 546 additions and 22 deletions

View file

@ -887,6 +887,10 @@
"show-bar": {
"type": "boolean",
"description": "Configures whether the built-in bar is shown.\n\nThe default is `true`.\n"
},
"focus-history": {
"description": "Configures the focus-history settings.\n\n- Example:\n\n ```toml\n [focus-history]\n only-visible: true\n same-workspace: true\n ```\n",
"$ref": "#/$defs/FocusHistory"
}
},
"required": []
@ -1094,6 +1098,21 @@
},
"required": []
},
"FocusHistory": {
"description": "Describes settings of the focus history.\n\n- Example:\n\n ```toml\n [focus-history]\n only-visible: true\n same-workspace: true\n ```\n",
"type": "object",
"properties": {
"only-visible": {
"type": "boolean",
"description": "Sets whether the focus history only moves to windows that are already visible.\n\nIf this is false, then the window will be made visible before focusing it.\n\nThe default is `false`.\n"
},
"same-workspace": {
"type": "boolean",
"description": "Sets whether the focus history only moves to windows on the same workspace.\n\nThe default is `false`.\n"
}
},
"required": []
},
"Format": {
"type": "string",
"description": "A graphics format.\n\nThese formats are documented in https://github.com/torvalds/linux/blob/master/include/uapi/drm/drm_fourcc.h\n\n- Example:\n\n ```toml\n [[outputs]]\n match.serial-number = \"33K03894SL0\"\n format = \"rgb565\"\n ```\n",
@ -1593,7 +1612,9 @@
"kill-client",
"show-bar",
"hide-bar",
"toggle-bar"
"toggle-bar",
"focus-prev",
"focus-next"
]
},
"Status": {

View file

@ -1802,6 +1802,20 @@ The table has the following fields:
The value of this field should be a boolean.
- `focus-history` (optional):
Configures the focus-history settings.
- Example:
```toml
[focus-history]
only-visible: true
same-workspace: true
```
The value of this field should be a [FocusHistory](#types-FocusHistory).
<a name="types-Connector"></a>
### `Connector`
@ -2232,6 +2246,42 @@ The table has the following fields:
The value of this field should be a boolean.
<a name="types-FocusHistory"></a>
### `FocusHistory`
Describes settings of the focus history.
- Example:
```toml
[focus-history]
only-visible: true
same-workspace: true
```
Values of this type should be tables.
The table has the following fields:
- `only-visible` (optional):
Sets whether the focus history only moves to windows that are already visible.
If this is false, then the window will be made visible before focusing it.
The default is `false`.
The value of this field should be a boolean.
- `same-workspace` (optional):
Sets whether the focus history only moves to windows on the same workspace.
The default is `false`.
The value of this field should be a boolean.
<a name="types-Format"></a>
### `Format`
@ -3617,6 +3667,14 @@ The string should have one of the following values:
Toggles the built-in bar.
- `focus-prev`:
Focuses the previous window in the focus history.
- `focus-next`:
Focuses the next window in the focus history.
<a name="types-Status"></a>

View file

@ -860,6 +860,10 @@ SimpleActionName:
description: Hides the built-in bar.
- value: toggle-bar
description: Toggles the built-in bar.
- value: focus-prev
description: Focuses the previous window in the focus history.
- value: focus-next
description: Focuses the next window in the focus history.
Color:
@ -2627,6 +2631,19 @@ Config:
Configures whether the built-in bar is shown.
The default is `true`.
focus-history:
ref: FocusHistory
required: false
description: |
Configures the focus-history settings.
- Example:
```toml
[focus-history]
only-visible: true
same-workspace: true
```
Idle:
@ -3716,3 +3733,34 @@ ContentTypeMask:
description: An array of masks that are OR'd.
items:
ref: ContentTypeMask
FocusHistory:
kind: table
description: |
Describes settings of the focus history.
- Example:
```toml
[focus-history]
only-visible: true
same-workspace: true
```
fields:
only-visible:
description: |
Sets whether the focus history only moves to windows that are already visible.
If this is false, then the window will be made visible before focusing it.
The default is `false`.
kind: boolean
required: false
same-workspace:
description: |
Sets whether the focus history only moves to windows on the same workspace.
The default is `false`.
kind: boolean
required: false