battery warning fix; zsh beam simplified

This commit is contained in:
Luke Smith
2020-12-18 11:56:46 -05:00
parent 29c8156e66
commit 741e9298bd
2 changed files with 7 additions and 12 deletions

View File

@@ -33,7 +33,7 @@ do
esac
capacity=$(cat "$battery/capacity")
# Will make a warn variable if discharging and low
[ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && local warn="❗"
[ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && warn="❗"
# Prints the info
printf "%s%s%d%%\n" "$status" "$warn" "$capacity"
printf "%s%s%d%%\n" "$status" "$warn" "$capacity"; unset warn
done && return 0