config: add content-type window criteria
This commit is contained in:
parent
fb5c50467b
commit
4fd70f03e1
22 changed files with 327 additions and 18 deletions
|
|
@ -924,6 +924,30 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"ContentTypeMask": {
|
||||
"description": "A mask of content types.\n",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "A named mask.",
|
||||
"enum": [
|
||||
"none",
|
||||
"any",
|
||||
"photo",
|
||||
"video",
|
||||
"game"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"description": "An array of masks that are OR'd.",
|
||||
"items": {
|
||||
"description": "",
|
||||
"$ref": "#/$defs/ContentTypeMask"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"DrmDevice": {
|
||||
"description": "Describes configuration to apply to a DRM device (graphics card).\n\n- Example: To disable direct scanout on a device:\n\n ```toml\n [[drm-devices]]\n match = { pci-vendor = 0x1002, pci-model = 0x73ff }\n direct-scanout = false\n ```\n",
|
||||
"type": "object",
|
||||
|
|
@ -1888,6 +1912,10 @@
|
|||
"workspace-regex": {
|
||||
"type": "string",
|
||||
"description": "Matches the workspace of the window with a regular expression."
|
||||
},
|
||||
"content-types": {
|
||||
"description": "Matches windows whose content type is contained in the mask.",
|
||||
"$ref": "#/$defs/ContentTypeMask"
|
||||
}
|
||||
},
|
||||
"required": []
|
||||
|
|
|
|||
|
|
@ -1855,6 +1855,47 @@ The table has the following fields:
|
|||
The value of this field should be a string.
|
||||
|
||||
|
||||
<a name="types-ContentTypeMask"></a>
|
||||
### `ContentTypeMask`
|
||||
|
||||
A mask of content types.
|
||||
|
||||
Values of this type should have one of the following forms:
|
||||
|
||||
#### A string
|
||||
|
||||
A named mask.
|
||||
|
||||
The string should have one of the following values:
|
||||
|
||||
- `none`:
|
||||
|
||||
The mask matching windows without a content type.
|
||||
|
||||
- `any`:
|
||||
|
||||
The mask containing every possible type except `none`.
|
||||
|
||||
- `photo`:
|
||||
|
||||
The mask matching photo content.
|
||||
|
||||
- `video`:
|
||||
|
||||
The mask matching video content.
|
||||
|
||||
- `game`:
|
||||
|
||||
The mask matching game content.
|
||||
|
||||
|
||||
#### An array
|
||||
|
||||
An array of masks that are OR'd.
|
||||
|
||||
Each element of this array should be a [ContentTypeMask](#types-ContentTypeMask).
|
||||
|
||||
|
||||
<a name="types-DrmDevice"></a>
|
||||
### `DrmDevice`
|
||||
|
||||
|
|
@ -4216,6 +4257,12 @@ The table has the following fields:
|
|||
|
||||
The value of this field should be a string.
|
||||
|
||||
- `content-types` (optional):
|
||||
|
||||
Matches windows whose content type is contained in the mask.
|
||||
|
||||
The value of this field should be a [ContentTypeMask](#types-ContentTypeMask).
|
||||
|
||||
|
||||
<a name="types-WindowMatchExactly"></a>
|
||||
### `WindowMatchExactly`
|
||||
|
|
|
|||
|
|
@ -3615,6 +3615,10 @@ WindowMatch:
|
|||
kind: string
|
||||
required: false
|
||||
description: Matches the workspace of the window with a regular expression.
|
||||
content-types:
|
||||
ref: ContentTypeMask
|
||||
required: false
|
||||
description: Matches windows whose content type is contained in the mask.
|
||||
|
||||
|
||||
WindowMatchExactly:
|
||||
|
|
@ -3668,3 +3672,27 @@ TileState:
|
|||
description: The window is tiled.
|
||||
- value: floating
|
||||
description: The window is floating.
|
||||
|
||||
|
||||
ContentTypeMask:
|
||||
description: |
|
||||
A mask of content types.
|
||||
kind: variable
|
||||
variants:
|
||||
- kind: string
|
||||
description: A named mask.
|
||||
values:
|
||||
- value: none
|
||||
description: The mask matching windows without a content type.
|
||||
- value: any
|
||||
description: The mask containing every possible type except `none`.
|
||||
- value: photo
|
||||
description: The mask matching photo content.
|
||||
- value: video
|
||||
description: The mask matching video content.
|
||||
- value: game
|
||||
description: The mask matching game content.
|
||||
- kind: array
|
||||
description: An array of masks that are OR'd.
|
||||
items:
|
||||
ref: ContentTypeMask
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue