From fe9afad7f2c65c4b65ea0bc00f508a3e178a3250 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Fri, 22 Feb 2019 21:40:14 +0100 Subject: [PATCH] Add battery unplug warning --- .scripts/wm/battery.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.scripts/wm/battery.sh b/.scripts/wm/battery.sh index 92809b3..690ae9f 100755 --- a/.scripts/wm/battery.sh +++ b/.scripts/wm/battery.sh @@ -29,6 +29,10 @@ if [ "$(echo $BAT_INFO | awk '{ print $6 }')" = "remaining" ]; then notify-send -u critical -r 1 "Battery critically low!" fi else + if [ "$CAPACITY" -ge "95" ]; then + notify-send -u low -r 1 "You should probably unplug." + fi + ICON="" fi