Those who’ve hooked up their MacBook to an external display are probably all too familiar with the dreaded dance of windows (not to be confused with George R.R. Martin’s bestselling A Dance with Dragons): You’ve got all your windows positioned exactly as you like them, then you disconnect your MacBook and blergh—windows every which way.
Sound familiar? Cordless Dog’s $15 Stay has the fix for what ails you. This menu-bar utility lets you save sets of window locations and sizes. So if you like your Twitter client pinned, just so, to the bottom-left corner of your screen, you can tell Stay to remember that window position—and here’s the key—both when you’re running your MacBook on its own and when it’s connected to your external display. If you want your IM client’s contact list to hug the right edge of the screen on your MacBook’s display but the left edge of your external display when it’s connected, Stay can do that too.
Better yet, you can have Stay automatically restore your windows whenever a display is connected and disconnected. So once you’ve chosen your favorite window positions, Stay does its thing transparently. (You can instead restrict Stay to being triggered manually, either using its systemwide menu or via a user-defined keyboard shortcut.) And if you’re particular about application window locations, you can choose to have Stay restore each app’s windows to particular sizes and locations whenever you launch that app.
Because Stay uses the names of windows to match them with the ones stored in your saved sets, the utility can have issues with windows whose titles change (for example, with text editors or Web browsers). You can fix that problem in one of two ways: by manually linking your current window to the one Stay has stored, using the Link Active Window To command in the app’s menu, or by setting up a window title pattern for Stay to look for.
Stay’s Edit Stored Windows window, accessible from the systemwide menu, lets you view all your stored display configurations—select one and click the Edit button and you’ll get a list of all the app windows you’ve stored in that configuration. It’s also here that you can set up the aforementioned title-pattern matching, using some simple pattern-matching syntax.
If that’s not enough power for you, you can also click the Actions tab, where you can write an AppleScript or shell script that will be triggered whenever the selected display configuration is activated. So, for example, every time you connect your external display to your MacBook, Stay can launch a specific application (or applications).
Stay’s not without its quirks. In particular, if you need a version that works with Mountain Lion’s Spaces feature, you must buy the utility directly from Cordless Dog—the Mac App Store version doesn’t support that functionality, due to Apple’s rules about using private APIs. In addition, there are a few apps that aren’t compatible with Stay (including Steam, X11, and most of the apps in Adobe’s Creative Suite) and some apps (including Google Chrome and some versions of iTunes) require manual window linking. Finally, I’ve occasionally noticed that some windows don’t restore correctly; however, another round of storing the window locations usually fixes that.
All in all, Stay is an invaluable tool for anybody who goes back and forth between display configurations, helping you avoid that hair-tearing, bewildered cry of “What the heck is that window doing there?”
Dan has been writing about all things Apple since 2006, when he first started contributing to the MacUser blog. He's a prolific podcaster and the author of the Galactic Cold War series, including his latest, The Nova Incident, coming in July 2022.