Custom Actions¶
The user may define a list of custom actions, which are shell commands bound to a specific key combination. These actions always have preference over those defined in Default Keybinds when they are bound to the same key combination.
Example¶
# ~/.config/miracle-wm/config.yaml
custom_actions: # Set meta + D to open wofi
- command: wofi --show=drun
action: down
modifiers:
- primary
key: d
Schema¶
A list of custom keybind actions:
custom_actions:
- command: <string>
action: <up|down|repeat|modifiers>
modifiers: <Modifier[]>
key: <KeysymName>
Properties¶
command¶
-
required type: String
The shell command to execute when the keybind is triggered.
action¶
-
required type:
up|down|repeat|modifiersThe key action that triggers the command:
up— Triggered when the key is releaseddown— Triggered when the key is pressedrepeat— Triggered repeatedly while the key is heldmodifiers— Triggered when modifiers change
modifiers¶
-
required type: List of modifier keys
Modifier keys that must be held for the command to execute. Available modifiers:
Name Description primarythe key defined by the Action Key altAny alt key alt_leftThe left alt key only alt_rightThe right alt key only shiftAny shift key shift_leftThe left shift key only shift_rightThe right shift key only ctrlAny ctrl key ctrl_leftThe left ctrl key only ctrl_rightThe right ctrl key only metaThe superorwindowskeymeta_leftThe left superorwindowskey onlymeta_rightThe right superorwindowskey onlysymThe sym key functionThe fnkeycaps_lockThe caps lock key num_lockThe num lock key scroll_lockThe scroll lock key
key¶
-
required type: KeysymName
Name of the XKB keysym that the action responds to. See the xkbcommon keysym list for available names (e.g.,
Return,z,Up).For shifted characters, use the shifted keysym directly instead of combining a lowercase key with the
shiftmodifier. For example, useQinstead ofq+shift, and useexclaminstead of1+shift.
Default¶
custom_actions: []