about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-07-07 15:21:55 +0200
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-07-07 15:21:55 +0200
commitda16306e28acf13751e786ded99e903b09de87fa (patch)
tree82ec62e6c71da9eaf6936976481f08f0fda67673
parentChanged aur get delay (diff)
downloaddwm-da16306e28acf13751e786ded99e903b09de87fa.tar.gz
dwm-da16306e28acf13751e786ded99e903b09de87fa.tar.bz2
dwm-da16306e28acf13751e786ded99e903b09de87fa.zip
Removed acpi depend
-rwxr-xr-xscripts/dwm-status9
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;