Skip to content

IPC

Makima-deckery exposes a Unix socket at $XDG_RUNTIME_DIR/makima-control.sock for runtime control. Commands are newline-terminated strings.

$XDG_RUNTIME_DIR is /run/user/<uid> — a per-user tmpfs with mode 0700, created by systemd at login. The socket lives there rather than in /tmp because /tmp is world-writable, and this socket accepts pause: anything able to create the path first could switch off input remapping. The per-user location also means each logged-in user gets their own socket, which is how deckery-auth-daemon addresses instances individually — it scans /run/user/*/makima-control.sock.

Commands

Command Effect
pause Suspend all remapping — input is still read and state is still exported, but no output events are emitted and no commands are executed
resume Resume normal remapping
gaming_mode enable Enable Gaming Mode — suppresses all remaps, passes raw input to the OS
gaming_mode disable Disable Gaming Mode — returns to normal remapping
config enable <name> Enable the named config, using its file base name (e.g. Firefox) — reflected immediately in state.json configs[].enabled
config disable <name> Disable the named app-specific config — the base config remains active. On the active member of an exclusive group this switches the whole group off; on an inactive member it does nothing
config group enable <slug> Switch a whole exclusive group on, restoring the member last chosen (e.g. kde-desktop-layout)
config group disable <slug> Switch a whole exclusive group off — no member stays active, and the remembered choice survives for the next enable
analog-state-export on Write analog axis values (sticks, trackpads) into state.json on every change
analog-state-export off Stop writing analog values (default — reduces write frequency)

Usage

echo "pause"                                        | socat - UNIX-CONNECT:$XDG_RUNTIME_DIR/makima-control.sock
echo "resume"                                       | socat - UNIX-CONNECT:$XDG_RUNTIME_DIR/makima-control.sock
echo "gaming_mode enable"                           | socat - UNIX-CONNECT:$XDG_RUNTIME_DIR/makima-control.sock
echo "gaming_mode disable"                          | socat - UNIX-CONNECT:$XDG_RUNTIME_DIR/makima-control.sock
echo "config enable Firefox"  | socat - UNIX-CONNECT:$XDG_RUNTIME_DIR/makima-control.sock
echo "config disable Firefox" | socat - UNIX-CONNECT:$XDG_RUNTIME_DIR/makima-control.sock
echo "config group disable kde-desktop-layout"      | socat - UNIX-CONNECT:$XDG_RUNTIME_DIR/makima-control.sock
echo "config group enable kde-desktop-layout"       | socat - UNIX-CONNECT:$XDG_RUNTIME_DIR/makima-control.sock
echo "analog-state-export on"                       | socat - UNIX-CONNECT:$XDG_RUNTIME_DIR/makima-control.sock
echo "analog-state-export off"                      | socat - UNIX-CONNECT:$XDG_RUNTIME_DIR/makima-control.sock

The socket may not exist if makima is not running — handle gracefully (socat exits with an error, nothing else happens). The current paused state is always reflected in $XDG_RUNTIME_DIR/makima-state.json.

HUD dry-run mode

The primary use case for pause/resume is the HUD overlay. When the HUD opens, it sends pause so button presses show up in the live preview without triggering real actions. When the HUD closes, it sends resume.

The primary use case for analog-state-export is the same: analog data is only written while the HUD is open (to keep the analog overlays current), and disabled again when the HUD closes to avoid unnecessary write load.

Bindings that bypass pause

Command bindings with no_pause = true fire even when makima is paused. The HUD toggle binding itself must use this flag, otherwise it would be impossible to close the HUD with the controller:

[commands]
BTN_THUMBL = { run = ["deckery-hud-toggle"], no_pause = true, label = "Toggle HUD" }