Spotify now Playing

Posted in Music by alberto1991lucca 2984 days ago

All credits goes to thcousins, I just modified his applescript a little bit. The code:

DATA=$(osascript -e 'tell application "System Events"
    set myList to (name of every process)
end tell
if myList contains "Spotify" then
    tell application "Spotify"
    if player state is stopped then
    set output to "Stopped"
    set trackname to name of current track
    set artistname to artist of current track
    set albumname to album of current track
    if player state is playing then
    set output to trackname & " | " & artistname & " | " & albumname & "new_line" & "Playing on Spotify | "
    else if player state is paused then
    set output to trackname & " | " & artistname & " | " & albumname & "new_line" & "Paused | "
    end if
    end if
    end tell
    set output to "Spotify is not running"
end if')
echo $DATA | awk -F new_line '{print $1}'
echo $DATA | awk -F new_line '{print $2}'



p.s. I hope you know what spotify is :)

Geeklet files to download


User Avatar
rcox1963 2953 days ago
Can the album cover art also be displayed?

Like this guy did...

Spotify info on the Desktop via NerdTool

User Avatar
alberto1991lucca 2949 days ago
Yes, I think yes.

But it's a too long work for me, i can't help you.
User Avatar
heythereheather01 2895 days ago
Why doesn't the stuff update when the song changes? I keep having to go into GeekTool and hit refresh. That gets annoying after the first few times. Can you help?
User Avatar
Raldor46 2866 days ago
im not using this geeklet but you should set a refresh rate of 1 second, so the second the song changes, the geeklet refreshes

Log in to comment or register here.