Skip to content

Instantly share code, notes, and snippets.

@FurloSK
Forked from ngopal/alarm_clock_spotify.scpt
Created January 25, 2019 00:09
Show Gist options
  • Save FurloSK/b77ae6be0729af1846df5fe7fdbe2c84 to your computer and use it in GitHub Desktop.
Save FurloSK/b77ae6be0729af1846df5fe7fdbe2c84 to your computer and use it in GitHub Desktop.
Setup your mac to use Spotify as your alarm clock
# In order to use this script, you must replace 'YOURUSERNAMEHERE' with your Spotify username.
# Execute this script like so: 'osascript alarm_clock_spotify.scpt' (without single-quotes obviously)
# Full explanation here: http://www.nikhilgopal.com/2011/08/show-and-tell-applescript-spotify-alarm.html
# If you would like to specify a playlist, please refer to this gist: https://gist.github.com/3344118
set volume 2
open location "spotify:user:YOURUSERNAMEHERE:playlist:muzic"
tell application "Spotify"
set the sound volume to 0
play
repeat 10 times
if sound volume is less than 80 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