1
0
Fork 0
forked from wry/wry

config: allow handling switch events

This commit is contained in:
Julian Orth 2024-04-28 13:35:52 +02:00
parent 55d55bf161
commit cf233abb5a
21 changed files with 443 additions and 27 deletions

View file

@ -1635,6 +1635,56 @@ The table has the following fields:
The value of this field should be a [Keymap](#types-Keymap).
- `on-lid-closed` (optional):
An action to execute when the laptop lid is closed.
This should only be used in the top-level inputs array.
- Example:
```toml
[[inputs]]
match.name = "<switch name>"
on-lid-closed = { type = "configure-connector", connector = { match.name = "eDP-1", enabled = false } }
on-lid-opened = { type = "configure-connector", connector = { match.name = "eDP-1", enabled = true } }
```
The value of this field should be a [Action](#types-Action).
- `on-lid-opened` (optional):
An action to execute when the laptop lid is opened.
This should only be used in the top-level inputs array.
- Example:
```toml
[[inputs]]
match.name = "<switch name>"
on-lid-closed = { type = "configure-connector", connector = { match.name = "eDP-1", enabled = false } }
on-lid-opened = { type = "configure-connector", connector = { match.name = "eDP-1", enabled = true } }
```
The value of this field should be a [Action](#types-Action).
- `on-converted-to-laptop` (optional):
An action to execute when the convertible device is converted to a laptop.
This should only be used in the top-level inputs array.
The value of this field should be a [Action](#types-Action).
- `on-converted-to-tablet` (optional):
An action to execute when the convertible device is converted to a tablet.
This should only be used in the top-level inputs array.
The value of this field should be a [Action](#types-Action).
<a name="types-InputMatch"></a>
### `InputMatch`