From 70e72e71721adf26bb00605d79001e00209ba97b Mon Sep 17 00:00:00 2001 From: cuu Date: Sat, 29 Dec 2018 11:18:26 +0000 Subject: [PATCH] 00_lowpower.sh --- sys.py/gsnotify/Jobs/00_lowpower.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys.py/gsnotify/Jobs/00_lowpower.sh b/sys.py/gsnotify/Jobs/00_lowpower.sh index af920d7..33ff5ab 100755 --- a/sys.py/gsnotify/Jobs/00_lowpower.sh +++ b/sys.py/gsnotify/Jobs/00_lowpower.sh @@ -4,11 +4,9 @@ BAT_PNT=`upower -i $(upower -e | grep 'battery') | grep -E "state|to\ full|perce if [ "$BAT_PNT" -lt "20" ]; then - if [ "$BAT_PNT" -lt "10" ]; then - echo '{"type":"once","content":"Low Battery: 10% of battery remaining"}' - fi - if [ "$BAT_PNT" -lt "5" ]; then + echo '{"type":"once","content":"Low Battery: 5% of battery remaining"}' + elif [ "$BAT_PNT" -lt "10" ]; then echo '{"type":"once","content":"Low Battery: 10% of battery remaining"}' fi