Now you can use your computer without fear of it falling asleep on you, yet have a secure feeling knowing that it will sleep without your help. It's quite simple to replicate sleepwatcher's functionality by adding the following to Hammerspoon's /.hammerspoon/a (or create a 'spoon') script that triggers when the machine wakes or sleeps and calls the corresponding wake and sleep scripts (in e.g. idle looks at the file and determines whether or not the computer should be put to sleep (if display is off, sleep if display on, don't sleep).Īnd this is how my SleepWatcher file, in /Library » StartupItems » SleepWatcher, looks: RunService ()Alternatively, you could put all the preferences from your config file inline with the command execution, but I find it easier to do it like this. How to enter sleep mode on a computer Select Start, then select Settings > System > Power & Sleep > Additional power settings. displaysleep and displaywakeup simply flip a bit in some file that acts as a preference, which I've designated to be /tmp/displayOff.txt. Bioz Stars score: 86/100, based on 1 PubMed citations. version 2.1.1 fixed a bug in argument parsing (when using only the -P or -U option, SleepWatcher 2. ![]() Timeout=6000displaysleep=echo "1" > /tmp/displayOff.txtdisplaywakeup=echo "0" > /tmp/displayOff.txtidle=if then /usr/local/sbin/sleepwatcher -n fi timeout is when you want your computer to fall asleep (in this case, 10 minutes). leepwatch/product/CompumedicsĜompumedicss series sleepwatch system S Series Sleepwatch System, supplied by Compumedics, used in various techniques.
0 Comments
Leave a Reply. |