minliner.blogg.se

Download sleepwatcher mac
Download sleepwatcher mac








download sleepwatcher mac

Now load this file: $ sudo launchctl load /Library/LaunchDaemons/de. You can see more options by running /usr/local/sbin/sleepwatcher without any option. Just open the file and your Mac will extract the downloaded file (sometimes it might have to. With -w option, /path/to/script.sh will be executed on wake. Then run: sudo cp /Desktop/sleepwatcher2.2/sleepwatcher.8. These get run at their respective times, when the laptop is going to sleep or waking. It loads the launch daemon then creates two files, /etc/rc.sleep and /etc/rc.wakeup. It them moves onto downloading the package and copying the files into the appropriate places. Setup sleepwatcherĬopy de. file into /Library/LaunchDaemons/: $ sudo cp /usr/local/Cellar/sleepwatcher/2.2/de. /Library/LaunchDaemons/de.Īnd edit it: Label de.bernhard-baehr.sleepwatcher ProgramArguments /usr/local/sbin/sleepwatcher -w /path/to/script.sh RunAtLoad KeepAlive The script begins with deleting any old version of sleepwatcher on the computer.

download sleepwatcher mac

Now it’s time to set sleepwatcher up, which will execute this script. Saved images will be named like captured_20160331_2058.jpg. This script will save captured images into the SAVE_PATH. Pull up your favourite text editor and paste the. Next, you're going to create /.sleep and /.wakeup files which SleepWatcher will call upon.

#Download sleepwatcher mac install

#!/bin/bash IMAGESNAP_BIN = "/usr/local/bin/imagesnap" SAVE_PATH = "/path/to/the/imagesnap_captures" # XXX - edit this to yours $IMAGESNAP_BIN " $ /captured_ ` date +%Y%m%d_%H%M `. Download and install SleepWatcher and its StartupItem. Create a shell scriptĬreate a script that will save photos using imagesnap. It will be used for monitoring sleep/awake states of the Macbook. Then install sleepwatcher: $ brew install sleepwatcher

download sleepwatcher mac

Install it with brew: $ brew install imagesnap Imagesnap is a command line tool which takes a photo with the built-in camera of Macbook. For some reason, I wanted to take a selfie whenever my Macbook Air wakes up from sleep.










Download sleepwatcher mac