$ upower -i $(upower -e | grep BAT) | grep --color=never -E "state|to\ full|to\ empty|percentage"
/sys/class/power_supply/BAT0/capacity
Index