This note was first posted on Wednesday, April 23rd, 2008 (2 and a half years ago).
Last edited on December 13th, 2008 (about 18 months ago)
![]()
Here’s a simple way to display what you’re listening to in iTunes on your desktop. It’s an Applescript, run using the osascript function in GeekTool, and works best with a refresh of 1 second.
The script first checks to see if iTunes is running, then goes on to query iTunes to get the track name, the artist and the album of the currently playing track, as well as the star rating, the current position and the total track length and it’s place in the current playlist.
It then does a bit of math on the various bits and pieces it retrieves from iTunes, formats it all so it’s easy to read [and crops it if the text is too long to fit in the space provided] and outputs the result in two lines of text. The finished product looks like what you see in the image above.
I’ve made available for download the .scpt file [zipped] for importing into Script Editor as well as a plain-text .txt file you can copy into Script Editor.
To use it, follow these instructions.
First, download the script and save the .scpt file and note the path.
Download and install GeekTool, and create a new entry.
Set the type to Shell, and add the following as the Command:
osascript "/path/to/script/itunes.scpt".
Set the Refresh to 1, set your colours, fonts and text [I recommend a transparent background, white, monospaced text at about 9pt with a forced carriage return and drop shadow] and set the location to wherever you’d like the output to appear.
The script will only appear when iTunes is running, and the 1 second update will make the timer run in real time.
Note: GeekTool is sometimes a little buggy, and occasionally it deletes my Command from the entry. I recommend creating a duplicate of the entry once you have it all set up, then disabling the duplicate. If something goes wrong, just delete the original entry, and turn on the duplicated version.