On ubuntu, you can do something similar with
upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep capacity | awk '{print $2}'
You can see all of your power options with upower -e