actually, let's do this a non-retarded way

This commit is contained in:
Luke Smith 2020-03-27 13:01:23 -04:00
parent 39bde79142
commit 6283e390b3
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252

View file

@ -19,8 +19,8 @@ do
capacity=$(cat "$battery"/capacity) || exit capacity=$(cat "$battery"/capacity) || exit
status=$(cat "$battery"/status) status=$(cat "$battery"/status)
# If it is discharging and 20% or less, we will add a ❗ as a warning. # If it is discharging and 25% or less, we will add a ❗ as a warning.
[ "$status" = "Discharging" ] && echo "$capacity" | grep -q "^[12][0-9]$" && warn="❗" [ "$status" = "Discharging" ] && [ "$capacity" -le 25 ] && warn="❗"
# Print the battery status (replaced by a cooresponding emoji with # Print the battery status (replaced by a cooresponding emoji with
# sed), the percentage left and the warning if there is one. # sed), the percentage left and the warning if there is one.