Merge pull request #2 from iandrewt/battery_status_mac

fixed with @dylanaraps suggestions from #1
This commit is contained in:
Dawid 2016-03-21 15:22:57 +01:00
commit faefa6c0fe
1 changed files with 1 additions and 2 deletions

View File

@ -1622,9 +1622,8 @@ getbattery () {
"Mac OS X")
battery="$(pmset -g batt | grep -o '[0-9]*%')"
power_status="$(pmset -g batt | awk 'NR==2 {print $3}')"
if [ "$power_status" == "charging;" ]; then
[ "$power_status" == "charging;" ] && \
battery="${battery} Charging"
fi
;;
"Windows")