Commits

Julien Jehannet committed 8695a16

[rbar] fix acpi usage

Comments (0)

Files changed (1)

 
 while (wmiir read /ctl &>/dev/null) {
 	#acpi -p | sed 's/.*Battery .: //g; s/discharging/-/g; s/charging/+/g; s/charged//g; s/%.*/%/g; s/, //g'
-	level=$(acpi -p | tr -d ' ' | cut -f2 -d":")
+	level=$(acpi | tr -d ' ' | cut -f2-3 -d":")
 	if [[ -n $(echo $level | sed -ne '/\charg/p') ]]; then
 		set -- $(echo $WMII_NORMCOLORS)
 		color="$1 $3 $2"