artangels / macosx-nosleep-extension

Automatically exported from code.google.com/p/macosx-nosleep-extension
0 stars 0 forks source link

Allow automatic disabling of NoSleep when battery goes below a threshold #96

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 adcur...@gmail.com on 23 Oct 2013 at 1:41

GoogleCodeExporter commented 8 years ago
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 adcur...@gmail.com on 23 Oct 2013 at 2:41

Attachments:

GoogleCodeExporter commented 8 years ago
+1. Would love this to be a proper feature.

Original comment by burto...@gmail.com on 1 May 2015 at 8:50