Fix always charging bug

This commit is contained in:
Jorge Gonzalez 2016-12-12 16:40:03 -05:00
parent eb7eff298d
commit 6dbdaa4a63
No known key found for this signature in database
GPG Key ID: AD2671B01BB1E086
1 changed files with 5 additions and 1 deletions

View File

@ -1709,7 +1709,11 @@ get_battery() {
"Mac OS X")
battery="$(pmset -g batt | grep -o '[0-9]*%')"
battery_state="$(pmset -g batt | awk 'NR==2 {print $3}')"
state="$(pmset -g batt | awk '/;/ {print $4}')"
if [ "$state" == "charging;" ];
then
battery_state="charging"
fi
;;
"Windows")