Scripting
Every hotkey step is also a shell command, so anything a binding does, a
script, a launcher or another hotkey daemon can do too. Each neru command
prints its reply, writes errors to stderr, and exits non-zero on failure.
Commands are in the CLI reference, and the
neru status --json fields under
neru status.
Pause and resume Neru
Section titled “Pause and resume Neru”if [ "$(neru status --json | jq -r .enabled)" = true ]; then neru stop; else neru start; fiCheck whether the daemon is running
Section titled “Check whether the daemon is running”neru status &>/dev/null && echo "Running" || echo "Not running"Drive Neru from another hotkey daemon
Section titled “Drive Neru from another hotkey daemon”ctrl - f : neru hintsctrl - g : neru gridctrl - r : neru hints --action right_clickRun several steps as one unit
Section titled “Run several steps as one unit”Use neru run instead of chaining neru
calls with &&. It sends the whole sequence in one request, under hotkey
binding rules.
To leave every global hotkey to the other daemon, see Recipes.
Talking to the daemon directly
Section titled “Talking to the daemon directly”To skip the neru binary, send JSON over the socket. The format is in
IPC protocol.