Skip to content

Instantly share code, notes, and snippets.

@col16
Created September 3, 2014 02:28
Show Gist options
  • Save col16/61b9bdd85a857ddc73c2 to your computer and use it in GitHub Desktop.
Save col16/61b9bdd85a857ddc73c2 to your computer and use it in GitHub Desktop.
#!/bin/bash
osascript <<EOD
display dialog "Ready to play song?"
tell application "Spotify"
set current_volume to the sound volume
if (player state is playing) then
repeat
repeat with i from current_volume to 0 by -1
set the sound volume to i
delay 0.05
end repeat
pause
set the sound volume to current_volume
exit repeat
end repeat
set the sound volume to current_volume
end if
pause
play track "spotify:local:::iStock_000021410538Wav48000:173" in context "spotify:user:col16:playlist:20gspPN5TiwzVNqnciD7uT"
end tell
EOD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment