A simple Alfred workflow to show the currently playing Spotify song, artist and track in a macOS notification via a hotkey
- Alfred - Free
- Alfred PowerPack - 💰
- Download latest version (1.0.0) here: WhoDis.alfredworkflow
- Double click the
WhoDis.alfredworkflow
file and it will install
on alfred_script(q)
tell application "Spotify"
set ctrack to the current track
set cartist to the artist of ctrack as text
set cname to the name of ctrack as text
set calbum to the album of ctrack as text
set strJSON to "{\"alfredworkflow\": {\"variables\": {"
set strJSON to strJSON & "\"NAME\": \"" & cname & "\", "
set strJSON to strJSON & "\"ARTIST\": \"" & cartist & "\", "
set strJSON to strJSON & "\"ALBUM\": \"" & calbum & "\", "
set strJSON to strJSON & "}}}"
return strJSON
end tell
end alfred_script