From 45e85d932a0720d0d306c1fd2c822e4e7864f563 Mon Sep 17 00:00:00 2001 From: Linux User Date: Wed, 28 Sep 2022 01:48:53 +0000 Subject: [PATCH] update batt script --- .local/scripts/0185_10_bat | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.local/scripts/0185_10_bat b/.local/scripts/0185_10_bat index 9d3642b..8c8bb26 100755 --- a/.local/scripts/0185_10_bat +++ b/.local/scripts/0185_10_bat @@ -23,6 +23,16 @@ else icon="" fi +chrg=$(cat /sys/class/power_supply/$DEVICE/status) + +if [[ "$chrg" == "Charging" ]] +then + icon="" +elif [[ "$chrg" == "Full" ]] +then + icon="" +fi + batpercent="$(echo $batpercent)%" echo "^b$COLOR1^^c$COLOR2^ $icon ^c$COLOR1^^b$COLOR2^ $batpercent ^d^"