From 0f373f6ab9fc675a239422bd39f56fcdc0bac3d4 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Wed, 18 Dec 2024 15:55:04 +0200 Subject: Changed battery notifier to first have a normal notif on 80% and only at 90% have a critical, that way most of the time I can just ignore it, and only if I was in a YT vid or smthing and didn't see it then at 90% I will get notified even when fullscreening --- scripts/battery_notifier.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/battery_notifier.sh b/scripts/battery_notifier.sh index 04485ff..4179a10 100755 --- a/scripts/battery_notifier.sh +++ b/scripts/battery_notifier.sh @@ -6,6 +6,13 @@ battery_level=$(cat /sys/class/power_supply/BAT0/capacity) battery_status=$(cat /sys/class/power_supply/BAT0/status) if [ "$battery_status" = "Charging" ] && [ "$battery_level" -ge 80 ]; then + /etc/profiles/per-user/kyren/bin/notify-send --urgency=normal \ + --app-name="Battery Notifier" \ + --expire-time=5000 \ + "Battery at $battery_level%, unplug!" +fi + +if [ "$battery_status" = "Charging" ] && [ "$battery_level" -ge 90 ]; then /etc/profiles/per-user/kyren/bin/notify-send --urgency=critical \ --app-name="Battery Notifier" \ --expire-time=5000 \ -- cgit v1.3.1