Improve morning-alarm.sh script
Enhancements: - Adjusted the way the alarm sound is played by introducing a loop to increase volume gradually. - Utilized a loop to iterate over volume levels from 10 to 100 with increments of 10. - Replaced the previous mpv command with a loop to control the volume for a smoother alarm experience. Code Clarity: - Added comments to clarify the purpose of the loop and volume adjustment. Note: This modification provides a more gradual increase in volume for the morning alarm, enhancing the user experience.
This commit is contained in:
parent
14dcb406c6
commit
89fd2f2f8c
@ -41,8 +41,10 @@ check_notification() {
|
|||||||
# Turn off Bluetooth
|
# Turn off Bluetooth
|
||||||
turn_off_bluetooth
|
turn_off_bluetooth
|
||||||
|
|
||||||
# Play alarm sound
|
## Play alarm sound
|
||||||
/data/data/com.termux/files/usr/bin/mpv --replaygain=track --loop=inf /data/scripts/your-new-morning-alarm.ogg &
|
for ((volume = 10; volume <= 100; volume += 10)); do
|
||||||
|
/data/data/com.termux/files/usr/bin/mpv --replaygain=track --volume="$volume" /data/scripts/your-new-morning-alarm.ogg &
|
||||||
|
done
|
||||||
|
|
||||||
# Increase volume and check notification
|
# Increase volume and check notification
|
||||||
while true; do
|
while true; do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user