Center the symbol when there is no number

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-12-13 13:23:55 +01:00
parent a740804cf3
commit 9e38637570
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -25,10 +25,10 @@ display_num=""
# Normal updates: White
[ $num -gt 0 ] && {
color="#ffffff"
display_num="${num}"
display_num=" ${num}"
}
# Requires reboot: Red
(echo "${updates}" | grep -qE "^($(get_grep))") && color="#dd0000"
printf '<span color="%s">\uf94f %s</span>' "${color}" "${display_num}"
printf '<span color="%s">\uf94f%s</span>' "${color}" "${display_num}"