diff options
-rwxr-xr-x | scripts/dwm-status | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/dwm-status b/scripts/dwm-status index 89d9c7f..559a84d 100755 --- a/scripts/dwm-status +++ b/scripts/dwm-status @@ -153,12 +153,11 @@ status() { \ echo "$delim" # Will show all batteries with approximate icon for remaining power. - ac_adapter=$(acpi -a | cut -d' ' -f3 | cut -d- -f1) - charging="" - if [ "$ac_adapter" == "on" ]; then - echo "" #Charging + ac_adapter=$(cat /sys/class/power_supply/BAT?/status) + if [ "$ac_adapter" == "Charging" ]; then + echo "" else - : #Not Charging + : fi for x in /sys/class/power_supply/BAT?/capacity; |