Automate your Mac

Automate your Mac: three hacks for managing apps

dragthing icon

Auto-hide apps

Tool: DragThing
I work with a lot of apps throughout the day and I keep them open at all times. This could lead to a lot of window clutter if it weren’t for DragThing. Within its General preference you find the Hide Other Applications When Switching option. Now, when I click on an icon in my DragThing app palette, the selected app comes to the fore and all other running apps disappear in the background.—Christopher Breen

breen hide apps dragthing

Open work apps when connecting to office Wi-Fi

Tool: Keyboard Maestro
Some of my most productive time is in the early morning. I usually arrive at the office before everyone else and get the most done in those early hours, without interruption. Trouble is, I’m also easily distracted. When I sit down at my desk in the morning, it can be too easy and tempting to open Twitter or some other shiny object on my Mac that’ll draw my attention away from the work at hand. I use Keyboard Maestro to get me focused.

Despite its name, Keyboard Maestro can do a lot more than trigger events via keyboard shortcut. It can also respond to other triggers—including connecting to a specific wireless network. So I created a macro that, when Keyboard Maestro detects that I’ve connected to the office Wi-Fi network, it uses the Open a File, Folder, or Application action to launch OmniFocus, BusyCal, DragonDictate, and Mail. Also, using the Open a URL action, it opens Safari to a work-related site I need to check every morning.—David Sparks

Prepare apps, desktop for screencasting

Tool: Automator

terpstra manage apps for screencast
I frequently create screencasts, which require a consistent desktop setup. Instead of setting things up manually every time, I made the process easier with Automator.

First, I inserted a Run AppleScript action to run the following script:

tell application "Finder" to return POSIX path of (desktop picture as alias)

I followed that with a New Text File action that stores the string that script generates (which is the path-location of the current Desktop picture) to a temporary file so I can restore it when I’m done.

Next, I insert another Run AppleScript action, which quits or pauses a bunch of applications that I don’t want running while I’m doing the screencast (which they could interrupt) and to hide the Dock:

tell application "Growl" to pause
tell application "TotalFinder" to quit
tell application "Simplify" to quit
tell application "System Events" to set the autohide of the dock preferences to true

Then I insert a Run Shell Script action that hides my Desktop icons and restarts Finder, while also disabling Notification Center (to avoid popups while I’m recording):

defaults write CreateDesktop 0 && killall "Finder"
launchctl unload /System/Library/LaunchAgents/

Finally, I insert a Get Specified Finder Items action, specifying my favorite desktop background image, followed by a Set the Desktop Picture action to enable it.

When I’m done with the screencast, another Automator workflow reverses all of that—restarting the applications, re-enabling notifications, and restoring the Dock and Desktop.—Brett Terpstra

Shop Tech Products at Amazon