|
|
iTunes, the menu bar, unicode, and GeekTool
What a great idea!
Here's my version of the script, which works basically the same way, but which contains more track information, allows me to easily add or remove that information from the display (by editing the second last line of the script), and adds a bit of punctuation to separate the pieces of information. The code that formats the rating as asterisks could undoubtably be improved, but I didn't think it was really worth the effort of learning the right AppleScript syntax. :) Note that this script still has the problem of starting iTunes if it's not already running, so you'll need to wrap it in shell script as reported in other comments, if you don't normally have iTunes running all the time (alternatively, in GeekTool, put the script in a particular group and only use that group when you're playing music).
iTunes, the menu bar, unicode, and GeekTool
I created a general purpose shell script which only executes the applescript if the appropriate application is running:
Then all my GeekTool shell commands look like
etc.
iTunes, the menu bar, unicode, and GeekTool
That's useful! Thanks!
If you change this line: if [[ -n "`ps -x | grep /Applications/${app}.app | grep -v grep`" ]]; then
to this: if [[ -n "`ps -x | grep -i /Applications/.*${app}.app | grep -v grep`" ]]; then
then you don't need to type the application name with the correct upper- and lower-case letters (the -i switch to grep does a case-insensitive search), and you can specify applications that exist in subdirectories under the Applications directory (.* handles that). An unfortunate side effect of the latter change is that if you have applications called (for example) MyBooks.app and Books.app (i.e., two or more applications ending with the same word), then entering "Books" as the application name might launch the wrong application. This isn't a problem for me (at the moment!) but bear that in mind if you add '.*' to your code.
iTunes, the menu bar, unicode, and GeekTool
Thanks for the script. With that and another hint on checking for iTunes process I got mine running. I deployed slightly different as I place mine just below the menu bar as I have other data there and no Cinema display.
I did make a few changes the most important of which was to change the percent reading to a rudimentary progress bar. Just easier for me to visualize. Here is the code I subsittuted (also change the stars to take less room by subbing 1*, 2*, etc.): Thanks again for the original script! |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:Hints1 new Hints in the last 24 hoursComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|