From: Jacob Casper Date: Fri, 15 Jan 2021 15:33:09 +0000 (-0600) Subject: Initial commit X-Git-Url: https://git.jacobcasper.com/?p=pm.git;a=commitdiff_plain;h=c24560933c6ba50f60fca473e7d3e6c2ea07ea18 Initial commit --- c24560933c6ba50f60fca473e7d3e6c2ea07ea18 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8df8055 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +install: + cp com.jacobcasper.pm* /Library/LaunchDaemons + ln -s $(shell pwd)/pm.sh /usr/local/bin/pm.sh + launchctl load -w /Library/LaunchDaemons/com.jacobcasper.pm.o* +uninstall: + rm -f /Library/LaunchDaemons/com.jacobcasper.pm* + rm -f /usr/local/bin/pm.sh + launchctl unload -w /Library/LaunchDaemons/com.jacobcasper.pm.o* diff --git a/com.jacobcasper.pm.off.plist b/com.jacobcasper.pm.off.plist new file mode 100644 index 0000000..ecef86a --- /dev/null +++ b/com.jacobcasper.pm.off.plist @@ -0,0 +1,20 @@ + + + + + Label + com.jacobcasper.pm.off + ProgramArguments + + /usr/local/bin/pm.sh + 0 + + StartCalendarInterval + + Hour + 18 + Minute + 0 + + + diff --git a/com.jacobcasper.pm.on.plist b/com.jacobcasper.pm.on.plist new file mode 100644 index 0000000..da2be6e --- /dev/null +++ b/com.jacobcasper.pm.on.plist @@ -0,0 +1,20 @@ + + + + + Label + com.jacobcasper.pm.on + ProgramArguments + + /usr/local/bin/pm.sh + 1 + + StartCalendarInterval + + Hour + 8 + Minute + 45 + + + diff --git a/pm.sh b/pm.sh new file mode 100755 index 0000000..a5bfe3a --- /dev/null +++ b/pm.sh @@ -0,0 +1,3 @@ +#!/bin/sh +echo $1 +pmset -a disablesleep $1