This commit is contained in:
Hekuran 2022-02-26 07:31:09 +01:00 committed by GitHub
parent f34a55dd9a
commit 6db35bdc69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,9 +31,9 @@ for battery in /sys/class/power_supply/BAT?*; do
*) exit 1 ;;
esac
capacity="$(cat "$battery/capacity" 2>&1)"
test $stat = '🔋' && \
test $capa -le 50 && stat='🪫' && \
test $capa -le 25 && warn='❗'
test $status = '🔋' && \
test $capacity -le 50 && stat='🪫' && \
test $capacity -le 25 && warn='❗'
# Prints the info
printf "%s%s%d%%" "$status" "$warn" "$capacity"; unset warn
done && printf "\\n"