Version1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> | |
<false/> | |
<key>Label</key> | |
<string>com.kolovos.script</string> | |
<key>LaunchOnlyOnce</key> | |
<false/> | |
<key>Program</key> | |
<string>/Users/Ioannis/.wakeup/start.sh</string> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>StartCalendarInterval</key> | |
<array> | |
<dict> | |
<key>Hour</key> | |
<integer>9</integer> | |
<key>Minute</key> | |
<integer>30</integer> | |
<key>Weekday</key> | |
<integer>1</integer> | |
</dict> | |
<dict> | |
<key>Hour</key> | |
<integer>9</integer> | |
<key>Minute</key> | |
<integer>30</integer> | |
<key>Weekday</key> | |
<integer>2</integer> | |
</dict> | |
<dict> | |
<key>Hour</key> | |
<integer>9</integer> | |
<key>Minute</key> | |
<integer>30</integer> | |
<key>Weekday</key> | |
<integer>3</integer> | |
</dict> | |
<dict> | |
<key>Hour</key> | |
<integer>9</integer> | |
<key>Minute</key> | |
<integer>36</integer> | |
<key>Weekday</key> | |
<integer>4</integer> | |
</dict> | |
<dict> | |
<key>Hour</key> | |
<integer>9</integer> | |
<key>Minute</key> | |
<integer>30</integer> | |
<key>Weekday</key> | |
<integer>5</integer> | |
</dict> | |
</array> | |
</dict> | |
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
osascript -e 'tell application "iTunes" to play playlist "Feel Free"' | |
osascript -e "set Volume 10" | |
osascript -e 'tell application "Slack" to activate' |
Version 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'time' | |
def wake_up! | |
`osascript -e 'tell application "iTunes" to play playlist "Feel Free"'` | |
`osascript -e "set Volume 10"` | |
`osascript -e 'tell application "Slack" to activate'` | |
end | |
wake_up_at = "09:30pm" | |
secs = Time.parse(wake_up_at) - Time.now | |
sleep secs | |
wake_up! |