I use GeekTool to display various different bits on my desktop -- which mail boxes have unread messages in them, and what is currently playing in iTunes. Then I thought, why not have the Artwork as well as the track info on the desktop, as seen at right (click the image for a larger version)? (I basically got the idea from this previous hint.) So here's my solution:
GeekTool runs an AppleScript that fetches the artwork from iTunes. Then a different GeekTool entry displays it. Quite simple, really. I've bundled up everything you need to get this working, along with some screenshots, into this 24KB archive. (There's also a 289KB version, which includes some screenshots that show what you get, and clarify the folder structure.)
After downloading the archive, follow the rest of the hint's instructions to get it all working...
How it works:
The AppleScript gets the artwork from iTunes as a PICT file. Although GeekTool can display this, you can't have a transparent PICT, which we need later. So the PICT file gets converted by Image Events into a TIFF, and is saved as albumArt.tif. The entry in GeekTool that displays the picture is pointed to where the albumArt.tif is saved.
If there's no artwork, or iTunes isn't running, then the albumArt.tif file is replaced by a transparent version. This is then displayed by GeekTool, which to you and me looks like there's nothing there.
To install:
Copy the folder "iTunes Artwork" into your Pictures folder, which is inside your Home folder. Save the AppleScript somewhere nice. In GeekTool, create a new entry and select "Shell." In the command bit, type osascript /path/to/AppleScript, replacing the path part with, hopefully obviously, the correct path. Set the Refresh to what ever you like; mine's set to 10 seconds.
Then create another entry in GeekTool, and select "Picture." In the URL bit, type:
file://file:///Users/username/Pictures/iTunes%20Artwork/albumArt.tif
Replace username with your user's short username. Again set the refresh to what ever you like. Install finished.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060406080910401