Cloning Terminal to Ease Window Managementby Rich Morin
With three screens up 24/7, it's easy for me to accumulate windows. I typically have several dozen available on my Mac, spread across a few dozen apps. In general, this is quite convenient. When I'm not using an app, I hide it (via cmd-H) and all of its windows disappear. If I want to get only a few windows out of the way, I WindowShade them or send them to the Dock.
Unfortunately, these approaches don't work very well for applications that have lots of windows. Terminal programs, for example, may have dozens of windows, each presenting a different shell and/or application context. Mac OS X doesn't let me hide some of an app's windows, so that's out. The Dock and WindowShade are awkward ways to manage dozens of windows; simply dismissing and retrieving a set of several windows becomes quite a hassle.
Fortunately, there is a (relatively) simple workaround. By using multiple copies of an app (e.g., Terminal), I can hide and display each copy's windows separately. I currently have four copies of Terminal available. One is used for generic tasks, two are used for specific projects, and one is idle.
This arrangement is working well. Any new Terminal window I create (via cmd-N) becomes part of the current copy's set. I even found a way to let a script know which Terminal it's running under. Finally, although it might be nice to have the ability to migrate windows between sets, this has not been a serious deficiency in practice.
How to Do It
Here's a basic walk-through of the procedure. Feel free to season to taste; after all, it's your machine! However, if you're a bit paranoid, you may want to quit the relevant copies of Terminal before performing these steps.
Copy the preference file and the Terminal app.
Using the Finder, go to
com.apple.Terminal_2.plist. Then, go to
Link up the app to the preference file.
Terminal_2.appand select "Show Package Contents." In the Contents folder, double-click on the
Info.plistfile. In the resulting Property List Editor, change
com.apple.Terminal_2(see Figure 1). Save and Quit to make the changes permanent.
Trim the foreign language support files (optional).
In the Resources folder, remove any superfluous
*.lprojfiles. This can reduce the copy's disk storage by more than 60 percent.
Figure 1. Making changes in Property List Editor.
You can now start up and play with the copied app. Some customization is also reasonable at this point. The following sections explain how to change the windows' titles, the app's name in the Menu Bar, and the value of the
TERM_PROGRAM environment variable. The techniques become increasingly scary as we go along; feel free to bail out at any time.
Pages: 1, 2