macosx-nosleep-extension icon indicating copy to clipboard operation
macosx-nosleep-extension copied to clipboard

Allow automatic disabling of NoSleep when battery goes below a threshold

Open GoogleCodeExporter opened this issue 9 years ago • 1 comments

It would be great if there was an option to disable NoSleep when the laptop is 
on battery power and below a certain threshold. Sometimes my laptop gets 
unplugged accidentally, and other programs would just keep it awake until the 
battery died. If it goes to sleep with like 5% battery left, that's enough to 
last half a day asleep.

Original issue reported on code.google.com by [email protected] on 23 Oct 2013 at 1:41

GoogleCodeExporter avatar Apr 04 '15 20:04 GoogleCodeExporter

a temporary solution is attached. 

I put this script in /usr/bin, and added a cron job to run it every 5 minutes. 
It will disable NoSleep if your battery is less than 8% (edit it to whatever 
you want). Requires NoSleepCtrl command line tool.

Original comment by [email protected] on 23 Oct 2013 at 2:41

Attachments:

GoogleCodeExporter avatar Apr 04 '15 20:04 GoogleCodeExporter