How can I read the status of the battery on my MacBookPro from my own application?
Googling has so far only revealed APIs for device drivers to handle power events -
Maybe help extracted text into script app
pmset -g batt | head -n 1 | cut -c19- | rev | cut -c 2- | rev
output
Battery Power AC Power