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.
This commit is contained in:
parent
313e9c8737
commit
62243df8ac
@ -31,6 +31,8 @@ check_notification() {
|
|||||||
else
|
else
|
||||||
date && echo "Alarm dismissed."
|
date && echo "Alarm dismissed."
|
||||||
killall mpv
|
killall mpv
|
||||||
|
break
|
||||||
|
#killall /data/data/com.termux/files/usr/bin/mpv
|
||||||
echo "$output"
|
echo "$output"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@ -51,5 +53,6 @@ done &
|
|||||||
for ((volume = 20; volume <= 100; volume += 10)); do
|
for ((volume = 20; volume <= 100; volume += 10)); do
|
||||||
echo "Actual volume: $volume"
|
echo "Actual volume: $volume"
|
||||||
/data/data/com.termux/files/usr/bin/mpv --replaygain=track --volume="$volume" /data/scripts/your-new-morning-alarm.ogg
|
/data/data/com.termux/files/usr/bin/mpv --replaygain=track --volume="$volume" /data/scripts/your-new-morning-alarm.ogg
|
||||||
|
#check_notification &
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user