I have a number of macros that I have set up for some specific tasks which open a number of Finder windows, specific apps and specific URLs. I tend to copy/paste these and adapt as necessary. What I would love to have is some way of recording/capturing what windows/apps are currently open (and where on the screen) and for that to be used to automatically save a workspace.
Does anything like this exist? Or something that gets even part of the way here?
Well, you could get all the open applications with the %Application%All% token. You could then iterate through that collection and use the %Window%All% to get the position of every window, plus URLs where appropriate. You could get Finder window paths with %FinderInsertionLocation%, document paths for other apps will probably be at the mercy of their AppleScript support.
Store all the above in some kind of data structure -- probably nested dictionaries. Then work out a way to process that structure to open everything the way you want it.
As @ccstone says, "...it would take a bit of work". You're probably better off tweaking and adding to what you've already got, unless you fancy a KM project!
Moom can save and restore window layouts, and while I haven't used it myself, Workspaces, which is also available on Setapp, can apparently save and restore the apps, files, and websites you have open. Between those two apps and KM filling in any gaps, you may be able to jury-rig something together.
Thanks for the tip. I am using a Mac mini with 3 displays. Every time the Mac wakes up from sleep, the windows in both secondary displays does not stay where they are. Some of them moved to the main displays and I have to manually use a KM macro to move them back to their right place. Ideally, I'd like a way to remember the positions of the open windows on these two secondary displays. And upon login, restore them back if they are moved to the main displays.
This is the part I feel I will struggle with. Is there any sample/example I can refer to?
My really simple macro to force a few apps such as Reeder, Kindle and Spotify to stay put in the Dell monitor as shown below. It's really just to activate the apps and move/resize them. I kept on repeating the "If The Else" statements a few times. It works but I feel that it's really very rudimental. Is there a way to make it shorter and easier?