config: implement shortcut latching
This commit is contained in:
parent
90dbde99ab
commit
6f55675bdb
14 changed files with 367 additions and 93 deletions
|
|
@ -2131,3 +2131,24 @@ ComplexShortcut:
|
|||
The action to execute.
|
||||
|
||||
Omitting this is the same as setting it to `"none"`.
|
||||
latch:
|
||||
ref: Action
|
||||
required: false
|
||||
description: |
|
||||
An action to execute when the key is released.
|
||||
|
||||
This registers an action to be executed when the key triggering the shortcut is
|
||||
released. The active modifiers are ignored for this purpose.
|
||||
|
||||
- Example:
|
||||
|
||||
To mute audio while the key is pressed:
|
||||
|
||||
```toml
|
||||
[complex-shortcuts.alt-x]
|
||||
action = { type = "exec", exec = ["pactl", "set-sink-mute", "0", "1"] }
|
||||
latch = { type = "exec", exec = ["pactl", "set-sink-mute", "0", "0"] }
|
||||
```
|
||||
|
||||
Audio will be un-muted once `x` key is released, regardless of any other keys
|
||||
that are pressed at the time.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue