Create special single-click-to-launch Dock folders

Feb 02, '06 05:50:00AM

Contributed by: robleach

One thing that I've always missed from Classic was the Launcher (or folder tabs with button icons). Neither the launcher nor folder tabs were perfect and neither is this hint, but they accomplished a task somewhat efficiently: easy access to all applications.

I've found that I like to have single-click access via the Dock to all my applications, but given limited space, that's just not feasible. Navigating the Finder is just too much of a hassle for me. I also liked the way you could categorize applications in the Launcher (or folder tabs with button icons), so I have combined the two concepts with a pair of AppleScripts attached as folder actions.

It works like this. I create a folder analogous to the categories I could make in the old Launcher, and I populate it with aliases to applications. I put this folder in the Dock. I then decide on a default application: an application I want to launch if I click on the folder in the Dock. I then insert the appropriate code into an AppleScript, and attach it as a folder action.

For example, I've created a web browser category with all my web browsers in it, making Safari my default app:

on opening folder this_folder
    tell application "Safari"
        activate
    end tell
end opening folder
I make another script which closes the category folder:
on opening folder this_folder
    tell application "Finder"
        close front window
    end tell
end opening folder
I attach both scripts to the category folder (the 'Close' one first, then the one that opens Safari). I then edit the folder icon to look like the Safari icon, and I'm done.

The nice thing about this is that I can still open Safari with a single click on the Dock (on the folder side, where the special folder is stored), and I don't need to have all my other browsers taking up dock space next to it. Yet if I want a different browser, I either click and hold the Safari folder icon, or control-click it, and I can select the alternative browser from the pop-up list.

There are two caveats. When Safari starts up, you end up with two Safari icons in the dock, yet that's better than six web browser icons. If I knew how, I'd simply add other browser selections to the Safari dock menu, but that's over my head. The other caveat is that the category folder flashes briefly on the screen each time I start up Safari. Yet I like the functionality so much that these issues are easily ignored.

I've made six categories, each with six or more contained applications and all with default applications I always use. My Dock is so much cleaner and usable and I can actually read the Mail message count, since its icon is much larger now! This is a great way to save Dock space and still have single click access via the Dock to all applications. No more large submenu or Finder navigation.

NOTE: If you ever want to edit the folder's contents, you'll have to use column view in the Finder. This will prevent the dafult app from being launched or the folder from being closed when double-clicked.

[robg adds: I tested this, and it does indeed work, though the Finder limitations can be a bit of an issue if you want to work with the special folders on a regular basis and you're not a column-view-only user.]

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060126112438371