Long holds occasionally dropped the release event in Hyprland, leaving whisrs recording until its silence auto-stop, and any stray toggle (key repeat, re-fired press) could invert the state so that pressing stopped and releasing started. The press and release binds now go through tiny scripts that check the daemon status first, making the toggle pair idempotent: start only when idle, stop only when recording. Also a note-to-self: Hyprland auto-reloads when files under the config symlink change, so a git rebase in this repo can transiently drop newly added binds; run hyprctl reload after git operations.
4 lines
No EOL
226 B
Bash
Executable file
4 lines
No EOL
226 B
Bash
Executable file
#!/bin/sh
|
|
# Start dictation only when the daemon is idle. Guards against stray toggle
|
|
# events (key repeat, re-fired press binds) inverting the recording state.
|
|
[ "$(whisrs status 2>/dev/null)" = "idle" ] && exec whisrs toggle |