Fix always charging bug

parent eb7eff29
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment