diff --git a/power.sh b/power.sh new file mode 100755 index 0000000..2fee9cf --- /dev/null +++ b/power.sh @@ -0,0 +1,22 @@ +#!/bin/bash +if `acpi -a | grep -q on` +then + echo "Â" +else + bat=`acpi -b | awk '{print $4}'` + bat="${bat%%%*}" #remove percent + if [[ $bat -gt 75 ]] + then + echo "ó" + elif [[ $bat -gt 25 ]] + then + if [[ $bat -gt 45 ]] + then + echo "ò" + else + echo "ò" $bat"%" + fi + else + echo "ñ" $bat"%" + fi +fi