Skip to content

Instantly share code, notes, and snippets.

@matiasvillaverde
Created October 15, 2018 19:09
Show Gist options
  • Save matiasvillaverde/e00d30921ba348d423acd8eae431e39e to your computer and use it in GitHub Desktop.
Save matiasvillaverde/e00d30921ba348d423acd8eae431e39e to your computer and use it in GitHub Desktop.
# 1) Create an Applescrip, paste this code and save it as .app
# 2) Create an Event in Calendar at the time you want to wake up
# 3) Set custom Alarm to 'Open File' and select this script.app
# Volume
set morningVolume to 40
# Happy Music to wake up
set morningTrack to "spotify:user:1243225188:playlist:09eeF2PyFuynRTXtIM0mew"
tell application "Spotify"
# Open Spotify
launch
delay 3
# Configurate
set the sound volume to 0
set shuffling to true
play track morningTrack
# Increase volume
repeat 10 times
if sound volume is less than morningVolume then
set sound volume to (sound volume + 10)
delay 3
end if
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment