#!/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. # Logs each invocation to /tmp/whisrs-hold.log for debugging dropped events. echo "$(date +%H:%M:%S.%N) press status=$(whisrs status 2>/dev/null)" >> /tmp/whisrs-hold.log [ "$(whisrs status 2>/dev/null)" = "idle" ] && exec whisrs toggle