Disable battery notifications script if no battery is found

This commit is contained in:
elenapan 2025-01-11 15:03:56 +02:00
parent 7e433a333c
commit feb0452d5e

View file

@ -8,6 +8,11 @@ level_full=97
level_low=20
level_critical=10
if [ ! -f "$battery_file" ]; then
echo No battery found. Exiting.
exit 1
fi
notify() {
playsound "$HOME/.config/sounds/system-error-notice.mp3"
notify-send.sh -R /tmp/battery-notifications-file "$@"