fix(talk): cancel button now stops audio playback

The shell '>' redirect creates ACTION_FILE immediately as an empty file.
The poll loop checked [ -f ] (exists) instead of [ -s ] (non-empty),
so it matched on the first 0.2s iteration, found no 'cancel' string,
and broke out of the loop — leaving mpv running with no listener.

[ -s ] only returns true once notify-send writes 'cancel' to the file
(i.e. when the user actually clicks the Abbrechen action).
This commit is contained in:
2026-07-02 19:43:53 +02:00
parent 02911c40ca
commit c94ff86c12
+1 -1
View File
@@ -93,7 +93,7 @@
$KILL "$NOTIFY_PID" 2>/dev/null || true
break
fi
if [ -f "$ACTION_FILE" ]; then
if [ -s "$ACTION_FILE" ]; then
if $GREP -q "cancel" "$ACTION_FILE" 2>/dev/null; then
$KILL "$MPV_PID" 2>/dev/null || true
fi