#!/bin/sh

acpi=`acpi -b`
    bat=`echo $acpi | linesplit ',' 1 | cut -b 2-`
    if echo $acpi | grep -q "Charging"; then
        echo -e " $bat"
    else
        charge=`echo $bat | sed -e 's/%//g'`
        if [ $charge -gt 75 ]; then
            echo -e "  $bat"
        elif [ $charge -gt 50 ]; then
            echo -e "  $bat"
        elif [ $charge -gt 25 ]; then
            echo -e "  $bat"
        else
            echo -e "  $bat"
        fi
    fi
