#!/bin/sh percent=$(acpi | cut -d ' ' -f4 | tr -d ',') state=$(acpi | cut -d ' ' -f3 | tr -d ',') case $state in Charging) symbol="\uf0e7" ;; *) symbol="\uf213" ;; esac echo -e "$symbol $percent"