Skip to content

Instantly share code, notes, and snippets.

@awaxa
Created July 7, 2017 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awaxa/e7c9bc0349b5e79b880b776f583028e3 to your computer and use it in GitHub Desktop.
Save awaxa/e7c9bc0349b5e79b880b776f583028e3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
url="$(osascript -e 'tell application "Spotify" to spotify url of current track')"
remove='spotify:track:'
url="${url#$remove}"
url="https://open.spotify.com/track/$url"
echo -n "$url" | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment