From 62243df8ac74b307158d48a57207fa74ee609a8d Mon Sep 17 00:00:00 2001 From: Ratatoskr Date: Thu, 1 Feb 2024 13:55:59 +0100 Subject: [PATCH] Update morning-alarm.sh script The morning-alarm.sh script has been modified with the following changes: - Added the 'break' statement after killing the mpv process to exit the loop when the alarm is dismissed. This prevents unnecessary iterations and improves script efficiency. - Commented out the line 'killall /data/data/com.termux/files/usr/bin/mpv' since it seems to be redundant after the 'killall mpv' command. If this line is intended for different use, it may need further clarification or context. These changes enhance the morning-alarm.sh script by optimizing the loop's termination when the alarm is dismissed, improving script efficiency and preventing unnecessary iterations. The redundant 'killall' line has been commented out for clarification. --- morning-alarm.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/morning-alarm.sh b/morning-alarm.sh index 8762d07..7e3de18 100755 --- a/morning-alarm.sh +++ b/morning-alarm.sh @@ -31,6 +31,8 @@ check_notification() { else date && echo "Alarm dismissed." killall mpv + break + #killall /data/data/com.termux/files/usr/bin/mpv echo "$output" exit fi @@ -51,5 +53,6 @@ done & for ((volume = 20; volume <= 100; volume += 10)); do echo "Actual volume: $volume" /data/data/com.termux/files/usr/bin/mpv --replaygain=track --volume="$volume" /data/scripts/your-new-morning-alarm.ogg + #check_notification & done