9 Commits

Author SHA1 Message Date
a5076ae046
Enhance morning-alarm.sh script:
- Clear morning-alarm.log before logging execution timestamp.
- Set a flag 'alarm_dismissed' for loop control.
- Modify the check_notification function to continuously check the alarm state and sleep for better efficiency.
- Start play.sh script in the background.
- Replace 'killall' with '/system/bin/pkill' for better compatibility.
- Introduce sleep intervals for smoother execution.
- Adjust the volume increment loop and add sleep before checking the notification.
- Properly exit the script when the alarm is dismissed, killing play.sh and mpv.
- Overall improvements for better readability and functionality in the morning-alarm.sh script.
2024-02-06 17:40:40 +01:00
62243df8ac
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.
2024-02-01 13:55:59 +01:00
1bb6546100
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.
2024-01-30 23:18:20 +01:00
89fd2f2f8c
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.
2024-01-30 22:39:21 +01:00
fe66c936c4
Refactor morning-alarm.sh script
Adjusted comments and translated the comments and script messages into English for better clarity. The script now provides more informative output during its execution, including status messages for Bluetooth operations, volume adjustment, and alarm notification checks. Additionally, introduced error handling for Bluetooth and volume adjustment operations to ensure the script exits gracefully in case of failures.

The main program section and function names have been retained for continuity, but the script's overall readability and understandability have been improved through language translation and comments rephrasing.
2024-01-26 23:47:02 +01:00
d9dc246bed
Update morning-alarm.sh script
Modify the morning-alarm.sh script to enhance clarity and maintainability. The changes involve updating the path for the mpv command to use '/data/scripts/your-new-morning-alarm.ogg' instead of the previous path '/product/media/audio/alarms/your-new-morning-alarm.ogg'. This adjustment ensures consistency with other script paths and makes it easier to locate the alarm sound file.

Changes made:
- Update the path for the mpv command to '/data/scripts/your-new-morning-alarm.ogg'

This modification simplifies the script and aligns it with the path used in other related scripts, improving overall script coherence.
2024-01-24 16:13:32 +01:00
426cbc55e5
Hinzufügen von Ausgabe für Ausführungszeitpunkt 2023-12-28 20:29:52 +01:00
728966a0d6
Anpassungen am morning-alarm.sh Skript:
- Änderung des Bluetooth-Ausschaltbefehls zu 'svc bluetooth disable'.
- Aktualisierung des Lautstärke-Erhöhungsbefehls.
- Verbesserte Ausgabe in der check_notification-Funktion.
- Entfernung des Timeout-Befehls bei der Überprüfung der Weckerbenachrichtigung.
- Hinzufügen von 'killall mpv' bei Beendigung des Weckers.
2023-12-18 12:58:44 +01:00
1dc5643f7b
Added script for controlling alarm on Android device
This script turns off Bluetooth, increases the media volume to 100%, and continuously checks if the alarm has been dismissed on the Android device. Additionally, it plays the morning alarm sound in an infinite loop until the alarm is dismissed.

- Script Name: morning-alarm.sh
- Features:
  - Turn off Bluetooth
  - Set media volume to 100%
  - Play the morning alarm sound in an infinite loop
  - Continuously check for alarm dismissal

Author: Michael Haider
Date: 17.12.2023
2023-12-17 21:46:44 +01:00