-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide option to not update when on battery #94
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Not stale |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Have added some labels that will hopefully stop the bot automatically closing the issue. |
I did not find an option to handle this request with Example #!/bin/sh
if [[ $(pmset -g ps | head -1) =~ "Battery Power" ]]; then
echo "Not starting autoupdate, because device is running on Battery"
exit
fi
# Script content ...
echo "Starting autoupdate..." A better solution would be to use this COM Interface from the IOKit https://developer.apple.com/documentation/iokit/iopowersources_h/1810316-iopsgetprovidingpowersourcetype. |
Since it starts on boot, this can also happen when in a place like a cafe and running off battery
Provide a setting/flag to not run autoupdate when currently on battery
The text was updated successfully, but these errors were encountered: