be a bit less spammy.

This commit is contained in:
fewtarius 2023-01-21 06:34:48 -05:00
parent fb289aef43
commit d57f80b683
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A

View file

@ -13,10 +13,8 @@
while true
do
STATUS="$(cat /sys/class/power_supply/{BAT*,bat*}/status 2>/dev/null)"
${DEBUG} && echo "Status: ${STATUS}"
if [ ! "${STATUS}" = "${CURRENT_MODE}" ]
then
${DEBUG} && echo "Status changed."
case ${STATUS} in
Disch*)
log $0 "Switching to battery mode."
@ -45,6 +43,5 @@ do
esac
fi
CURRENT_MODE="${STATUS}"
${DEBUG} && echo "Current Mode: ${CURRENT_MODE}"
sleep 2
done