extra battery warning

This commit is contained in:
Luke Smith 2018-11-27 13:56:32 -05:00
parent fcf17a70f1
commit b4de391de0

View file

@ -7,6 +7,7 @@ case $BLOCK_BUTTON in
♻: stagnant charge ♻: stagnant charge
🔌: charging 🔌: charging
⚡: charged ⚡: charged
❗: battery very low!
- Text color reflects charge left" ;; - Text color reflects charge left" ;;
esac esac
@ -23,8 +24,11 @@ elif [ "$capacity" -ge 20 ]; then
color="#FFAE00" color="#FFAE00"
else else
color="#FF0000" color="#FF0000"
warn="❗"
fi fi
[ -z $warn ] && warn=" "
[ "$status" = "Charging" ] && color="#FFF" [ "$status" = "Charging" ] && color="#FFF"
printf "<span color='%s'>%s %s</span>" "$color" "$(echo "$status" | sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$(echo "$capacity" | sed -e 's/$/%/')" printf "<span color='%s'>%s%s%s</span>" "$color" "$(echo "$status" | sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')"