Translucent Menu Bar Fix a la Automator and Quartz Composer

October 29th, 2007

I haven’t met anyone that likes the transparent menu bar in Leopard.

So here are a couple of ways to fix it:

  1. Use a program to fix it like the Non-Transparent Menu Bar Program from the fine folks at Many Tricks.
  2. Or paint a white rectangle on the top of your background picture the same height as the menu bar.

I personally didn’t want to have a program running in the background all the time just to fix a UI flaw, however I’m one of those people that changes their desktop background fairly often, so I also didn’t want to have to manually edit my background every time it changed.

The Magic of Quartz Composer

Using Quartz Composer it is easy to do things like take a white rectangle and scale it to the appropriate size and location to be exactly on top of some image of arbitrary size. Using the “Image Filter” template sets our composition up to be used by any application that can take advantage of Image Filters.

All we have to do is put our Quartz Composer file in ~/Library/Compositions or /Library/Compositions and its ready to be used.

I still want to be able to apply this directly from the finder though.

Automator to the rescue

Automator has a lot of great ways to automate repetitive tasks. It takes exactly five tasks to do what we want:

  1. Get Selected Items - This will take whatever file you have selected in the finder and pass it to the next task.
  2. Copy Finder Items - Unsurprisingly this task makes a copy of the file from task 1. In our case we’re copying it to the Pictures folder.
  3. Rename Finder Item - This task is amazingly useful, here we’re using it to add an _mb after the filename (but before the extension) of our copied image.
  4. Apply Quartz Composition Filter to Image Files - Here is where the magic happens. In this action the file we renamed in task 3 gets modified by the image filter of our choice.
  5. There are a couple of parameters here that start with _protocolInput… that our composition doesn’t use for anything, so don’t worry about those. Just select the filter to use from the drop down box.

  6. Set the Desktop Picture - Finally using this action we take our newly filtered image and set it as the desktop background.

Save this workflow as a Finder plugin “File->Save as Plug In…” and you can now right click on any image and through the automator sub menu select your newly saved workflow that will do all of the above for you.

I have included the source files and install instructions here. I could have packaged this all up into a nice installer package but I don’t really like installer packages so I didn’t.

Also, this particular setup only works if your desktop resolution is set to 1440 x 990. There doesn’t seem to be a way to deduce the screen resolution from inside automator or Quartz Composer, so you’re stuck with the resolution I use on my MBP. If there is a way to get the resolution, someone tell me and I’ll update the source files.

Leave a Reply