From f967b69520737b4bf011427ecff6be070bc1369d Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Wed, 3 Jun 2020 17:49:55 +0530 Subject: i'm dumb --- bin/.local/bin/bat_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/.local/bin/bat_check.sh b/bin/.local/bin/bat_check.sh index 4559954..453d129 100755 --- a/bin/.local/bin/bat_check.sh +++ b/bin/.local/bin/bat_check.sh @@ -3,7 +3,7 @@ while true do battery_level=$(cat /sys/class/power_supply/BAT0/capacity) state=$(cat /sys/class/power_supply/BAT0/status) - if [ $battery_level -ge 95 ] && [ $state == "Discharging" ]; then + if [ $battery_level -ge 95 ] && [ $state == "Charging" ]; then notify-send 'Pull the plug!' $battery_level% elif [ $battery_level -le 30 -a $battery_level -ge 20 ] && [ $state == "Discharging" ]; then notify-send 'Plug me!' $battery_level% -- cgit v1.2.3