Merge pull request #970 from fewtarius/dev

be a bit less spammy.
This commit is contained in:
fewtarius 2023-01-21 06:36:01 -05:00 committed by GitHub
commit 60edd14d0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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