-
-
Save FurloSK/b77ae6be0729af1846df5fe7fdbe2c84 to your computer and use it in GitHub Desktop.
Setup your mac to use Spotify as your alarm clock
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
# 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