summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2024-12-18 15:55:04 +0200
committerKyren223 <Kyren223@proton.me>2024-12-18 15:55:04 +0200
commit0f373f6ab9fc675a239422bd39f56fcdc0bac3d4 (patch)
treedfa7f06a6b4bb07c4eb2e80001250f0abb1e9923
parent51e6c2b2df88a0a801f37e49f1a04d6095ab0031 (diff)
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
-rwxr-xr-xscripts/battery_notifier.sh7
1 files changed, 7 insertions, 0 deletions
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 \