|
|
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. |
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.14 seconds |
|