battery warning fix; zsh beam simplified

This commit is contained in:
Luke Smith committed 2020-12-18 11:56:46 -05:00
1 parent 29c8156e66
commit 741e9298bd
2 files changed
+7 -12

No files matched your search

+2 -2
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