Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'iTunes, the menu bar, unicode, and GeekTool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
iTunes, the menu bar, unicode, and GeekTool
Authored by: wallybear on Jul 06, '04 11:41:20AM
A good idea, else if I wonder how you managed to have some space available on the menu bar (I use 1280x1024 and have none... :-( )
I did something similar with GeekTool, but in a small window at the bottom of the screen, and with more infos (track, time, Album, Equalization, Genre). Here's the script:


#!/bin/sh

if ps x | grep iTunes | grep -q -v grep;   then 
  osascript -e 'tell app "iTunes"' -e "set a to current track" 
  -e '" Track: " & name of a as text & " (" & time of a & ")" & 
  "\r\nArtist: " & artist of a & "  Album: " & album of a 
  & "\r\n    EQ: " & return & EQ of a & "  Genre: " & 
  genre of a' -e "end tell" | iconv -f utf-8 -t ucs-2-internal
else
  echo "iTunes inactive" $A
fi

As you can see the scripts checks if iTunes is running. If not, it does not execute the applescript as this would launch iTunes, but displays an informative message.
I call this shell script (I named it "whichTune") from GeekTool, using a small 3-lined translucent window with a really small font size (but readable).
The only drawback is the idle period between calls: as iTunes does not send events when a track changes, I must decide the frequency of checks; I opted for 15 seconds to reduce waste of cycles, but it's all your choice.

[robg adds: IMPORTANT NOTE ... I wrapped the above script for a much narrower display. When entering it, remove the line breaks on the "if" line until the line before "else." Replace each line break with a single space.]

[ Reply to This | # ]
iTunes, the menu bar, unicode, and GeekTool
Authored by: Pausanias on Jul 07, '04 04:58:09PM

Once you get a cinema display (1600x1050 or higher), you'll have an incredible amount of wasted menu bar space. I also use the space to display the name of the senders of incoming messages.



[ Reply to This | # ]