all repos — dotfiles @ e04b8ecd3898a329203432f91675e297fb5ff689

linux dotfiles

i3blocks/battery.sh (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
percent=$(acpi | awk '{print $4}')
state=$(acpi | awk '{print $3}' | tr -d ',')

case $state in
    Charging)
        symbol="<span font='Font Awesome 5 Free 9'>\uf0e7</span>"
        ;;
    *)
        symbol="<span font='Icons 11'>\uf213 </span>"
        ;;
esac

echo -e "$symbol $percent"