Actions
Actions define what happens when you press a button. Sireno Deck supports multiple gesture types and action formats.
Gestures
Section titled “Gestures”Each button can respond to different gestures:
| Gesture | Description |
|---|---|
tap |
Single button press |
dbl-tap |
Double press within 200ms |
hold |
Press and hold for 200ms+ |
Action Types
Section titled “Action Types”Shell Commands
Section titled “Shell Commands”Run any shell command:
actions: tap: "open https://example.com" hold: "echo 'held'"Keyboard Input
Section titled “Keyboard Input”Send keystroke combos with macro:// and literal text with type://:
actions: # Literal text (typed verbatim) tap: "type://hello world" tap: "type://🔥"
# Single keys and combos tap: "macro://ctrl+c" tap: "macro://alt+tab" tap: "macro://Escape" tap: "macro://Up"
# Platform-specific shortcuts tap: 'macro://{"all":"ctrl+shift+p","osx":"cmd+shift+p","windows":"ctrl+shift+p"}'
# Delays between steps tap: "macro://ctrl+a; delay(50ms); ctrl+c"Built-in Actions
Section titled “Built-in Actions”| Protocol | Description |
|---|---|
type://... |
Send text verbatim |
macro://... |
Keystroke combos |
brightness://up |
Increase brightness |
brightness://down |
Decrease brightness |
Examples
Section titled “Examples”Open URL
Section titled “Open URL”- position: 0 type: "core:action" actions: tap: "xdg-open https://github.com" config: icon: "icon://github" label: "GitHub"Media Controls
Section titled “Media Controls”- position: 0 type: "media:player" config: icon: "icon://play"Deck Navigation
Section titled “Deck Navigation”- position: 0 type: "core:change-deck" config: deck: "settings" icon: "icon://settings" label: "Settings"Toggle State
Section titled “Toggle State”- position: 0 type: "core:toggle" config: key: "mute-toggle" default: false config: icon: "icon://volume-x" label: "Mute"Host Placeholders
Section titled “Host Placeholders”Interpolate system information in commands:
actions: tap: "echo User: {{ host.username }}, Host: {{ host.hostname }}"Available placeholders:
{{ host.hostname }}— Computer hostname{{ host.platform }}— OS (linux, darwin, win32){{ host.username }}— Current user{{ host.homedir }}— Home directory{{ host.arch }}— Architecture