Instead of parsing the output of `upower --dump` to get battery info,
which left odd whitespace, just tail the battery number off of `acpi`
- echo -n "$(upower -d | grep percentage | tail -c 5)"
- if [[ $(upower -d | grep "discharging") ]]; then
- echo -n " battery,"
- echo "$(upower -d | grep "time to empty" | tail -c 15) remaining"
- else
- echo -n " battery,"
- echo "$(upower -d | grep "time to full" | tail -c 15) until charged"
- fi
+ echo $(acpi | tail -c +12)