I've been using Stay for a few years, but for some reason it occasionally forgets stored window positions. I decided just now that I might roll my own. In its current form, this pair of macros will recall the front window of any application to its stored position.
This macro uses any line containing the front application name to recall the front window size and position. If no matching line is found, you will be notified accordingly.
I'd like this to work for multiple windows of a given application, if they exist.More hassle than it's worth as this would mostly be apps with multiple documents open, each with a distinct title.
I'd like each window to be recalled to its particular stored position, rather than simply whichever is front-most.As above.
I'd like this to work for any number of screen configurations. For example, if no external monitors are attached, Position A will be recalled; if one screen is attached, Position B; two screens, Position C, etc. DONE (See below)
I'd like window positions to be recalled automatically when any application (whose window positions have been stored) launches, without setting individual application triggers. DONE! (See below)
If anyone would like to have a play around with the above macros or scrap them and start again, please do!
It was a bit of a daft idea now that I think about it.
I think a more useful function would probably be to recall the front window of each visible app to its stored position in one go. Probably not useful enough to justify the time spent figuring it out though!
The basic version is actually working great so far. I've added an Any Application trigger to the Recall macro so that apps launch in their stored positions, and I've also tried to account for different numbers of screens. It doesn't take resolution into consideration; just how many screens are available, which is good enough for me. So, when I plug my Macbook Pro into my external monitor, it recalls the position properly. As you can see there's an entry for 1 screen and one for 2.
Global Variable screenshot
I haven't tested enough to be certain, but I think it might be working!