summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2025-03-27 03:55:32 +0100
committernavewindre <boneyaard@gmail.com>2025-03-27 03:55:32 +0100
commit91700a1c04938e7ea7aadf5cd6d4022f757701ed (patch)
tree921e9e57432a0ff4ddd3558994c1319448f9678f
parent68ffa486d376c57cfc0212825f1139d19f15e562 (diff)
a
-rwxr-xr-xrecord.sh7
1 files changed, 1 insertions, 6 deletions
diff --git a/record.sh b/record.sh
index e5e05e9..2e8bc74 100755
--- a/record.sh
+++ b/record.sh
@@ -15,11 +15,6 @@ trap cleanup SIGINT SIGTERM
ffmpeg -f pulse -i alsa_output.usb-FX-AUDIO-_DAC-X3PRO_20313330544D4319001C8004-00.analog-stereo.monitor /tmp/desktop_audio_temp.mp3 &
FFMPEG_PID=$!
-while true; do
- read -t 0.1 -n 1 key
- if [[ $key == $'\e' ]]; then
- cleanup
- fi
-done
+xev | grep -q "keycode: 9" && cleanup
wait $FFMPEG_PID