commit 7d728c05702afce1bf830d26285eeb72d6d63414 parent 6a7a2f09e7bf7340f53b0c1d5a6ab480645178d1 Author: Anders Damsgaard Christensen <adc@geo.au.dk> Date: Wed, 13 Jul 2016 09:46:42 -0700 configure for macOS sierra Diffstat:
M | bin/battery-osx | | | 17 | ++++++++++++++++- |
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/bin/battery-osx b/bin/battery-osx @@ -1,6 +1,6 @@ #!/bin/bash -e pmset -g batt | head -n 2 | tail -n 1 |\ - awk '{ print $2 $3 $4 }' |\ + awk '{ print $3 $4 $5 }' |\ sed 's/;/ /g' |\ sed 's/(no//' |\ sed 's/ discharging//' |\ @@ -12,3 +12,18 @@ pmset -g batt | head -n 2 | tail -n 1 |\ sed 's/ $//' |\ sed "s/drawingfrom'AC//" |\ sed 's/failure.*/batt fail/' + +# El Capitan and prior +#pmset -g batt | head -n 2 | tail -n 1 |\ +# awk '{ print $2 $3 $4 }' |\ +# sed 's/;/ /g' |\ +# sed 's/(no//' |\ +# sed 's/ discharging//' |\ +# sed 's/ charged//' |\ +# sed 's/ 0:00//' |\ +# sed 's/ charging/ ☇/' |\ +# sed 's/ACattached/☇/' |\ +# sed 's/finishingcharge/☇/' |\ +# sed 's/ $//' |\ +# sed "s/drawingfrom'AC//" |\ +# sed 's/failure.*/batt fail/'