commit d636c31312675c3381968a778d3115053a5527e7
parent db6a1d495d255406c0c704c317e6eee43e331843
Author: dwrz <dwrz@dwrz.net>
Date: Wed, 1 Nov 2023 19:00:59 +0000
Add sound to check_battery script
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/scripts/check_battery b/scripts/check_battery
@@ -9,8 +9,10 @@ fi
if [ "${CAPACITY}" -ge 0 ] && [ "${CAPACITY}" -le 3 ]; then
notify-send --urgency critical "CRITICAL BATTERY" \
"Battery capacity is ${CAPACITY}%, hibernating in 30 seconds."
+ paplay /usr/share/sounds/woodenbeaver/stereo/battery-low.ogg
sleep 30
systemctl hibernate
elif [ "${CAPACITY}" -ge 5 ] && [ "${CAPACITY}" -le 10 ]; then
notify-send --urgency low "LOW BATTERY" "Battery capacity is ${CAPACITY}%."
+ paplay /usr/share/sounds/woodenbeaver/stereo/battery-low.ogg
fi