dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b4de391de022a491b8b90f4ba661de0b1048cb47
parent fcf17a70f15fa0fedef00a4c340220e71c004555
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Tue, 27 Nov 2018 13:56:32 -0500

extra battery warning ❗

Diffstat:
M.scripts/statusbar/i3battery | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/.scripts/statusbar/i3battery b/.scripts/statusbar/i3battery @@ -7,6 +7,7 @@ case $BLOCK_BUTTON in ♻: stagnant charge 🔌: charging ⚡: charged +❗: battery very low! - Text color reflects charge left" ;; esac @@ -23,8 +24,11 @@ elif [ "$capacity" -ge 20 ]; then color="#FFAE00" else color="#FF0000" + warn="❗" fi +[ -z $warn ] && warn=" " + [ "$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/$/%/')"