How to get the battery status from command line?
We can echo battery percentage with the following command:
upower -i $(upower -e | grep 'BAT') | grep -E "state|to\ full|percentage" | awk '/perc/{print $2}'
# 65%
Other details and methods about battery status are available on this QA