[EDIT]: This script won't work anymore. The interface used to connect to VLC has since been deprecated.
A couple of scripts that should work with VLC's web remote interface.
curl -s http://localhost:8080/requests/status.xml | grep title | sed -e 's/<title><!\[CDATA\[//' -e 's/\]\]><\/title>//'
curl -s http://localhost:8080/requests/status.xml | grep artist | sed -e 's/<artist><!\[CDATA\[/By: /' -e 's/\]\]><\/artist>//'
...and Album info:
curl -s http://localhost:8080/requests/status.xml | grep album | sed -e 's/<album><!\[CDATA\[/From the album: /' -e 's/\]\]><\/album>//'
These are all just shell scripts I set to refresh at 5 second intervals. Not the most elegant solution, but it works for the most part. You might have to change your port from 8080 to whatever VLC is using (I saw someone using it with 8081 somewhere else on the site)
EDIT: Here's something new, album art. This requires wget to be installed, though. What it does is check if VLC has the album art downloaded, if not it downloads it itself (from last.fm) and adds it to VLC's cache.
#!/bin/sh #Get the artist name artist=$(curl -s http://localhost:8080/requests/status.xml | grep '<artist>' | sed -e 's/.^//' -e 's/<artist><!\[CDATA\[//' -e 's/\]\]><\/artist>//' -e 's/'/'"'"'/' -e 's/\:/_/') #Get the album name album=$(curl -s http://localhost:8080/requests/status.xml | grep album | sed -e 's/<album><!\[CDATA\[//' -e 's/\]\]><\/album>//' -e 's/'/'"'"'/' -e 's/\:/_/') #Get the image that VLC is supposed to have downloaded. dir=$(echo $HOME/Library/Caches/org.videolan.vlc/art/artistalbum/$artist/$album | sed -e 's/\/ /\//' -e 's/\/ /\//') #Get the image itself from the aforementioned directory. img=$(echo $dir | sed -e 's/$/\/art.jpg/') #If the image actually exists then copy it to /tmp/ (the directory watched by GeekTool) if [ -f "$img" ]; then cp "$img" "/tmp/art.jpg" #If we can't find the image (as in, if VLC hasn't downloaded it) then go and download the corresponding cover art from last.fm else #You might want to put your own API Key here... just sayin' apikey=e08848917ab7093ffa65cbd40108dab7 url=$(echo http://ws.audioscrobbler.com/2.0/?method=album.getinfo\&api_key=$apikey\&artist=$artist\&album=$album | sed -e 's/artist= /artist=/' -e 's/album= /album=/' -e 's/ /%20/g') url=$(curl --silent $url | grep -m1 '<image size="mega">' | sed -e 's/<image size="mega">//' -e 's/<\/image>//') #Download the image to /tmp/ so geektool gets access to it first. wget --quiet -O "/tmp/art.jpg" $url #If the directory for the album art doesn't already exist in VLC's offline album art cache, create it and then copy the new image over to it. if [[ -z "$dir" ]] then mkdir "$dir" #cp "/tmp/art.jpg" "$img" exit fi #mkdir $dir cp "/tmp/art.jpg" "$img" fi
Also I would recommend setting VLC's "Album Art Policy" in the main preferences page to download album art (unless you want the script to do it itself), since the script gets album art from VLC's album art folder.
(In addition to this script, you want to create an image that displays the image $HOME/Library/Caches/org.videolan.vlc/art/art.jpg)