This is what I’m looking for too. I have three places I plug in displays: home office, work office, no displays (coffee shop). I have specific windows I want in specific places when plugged into external displays at home or work. Browser, Remote Desktop tool, chat client, etc. Every time I come back from the coffee shop, I have to manually re-arrange my windows. First world problem I know but every time I think “it should be smart enough to land these windows in this spot”
Similar with code editors: it should be smart enough to re-arrange my docks based on screen size. When I have big screen, expand side and bottom sub-windows. When I’m just on laptop screen, auto hide them.
Ivan Sapozhnik (https://twitter.com/iSapozhnik) is working on adding this to his Lasso app (https://thelasso.app/). It's not an easy problem to solve as there's no API that can just save and restore windows, a lot of inventive solutions have been tried and failed.
Do you know of any specific writeups? I couldn't find any obvious results, but I'm curious where the difficulties lay. Tbh, I'd be happy with just "windows with this parent process go here" list - I wonder how far off that is.
I don't have any link on hand right now for a writeup, but I've followed yabai's (https://github.com/koekeishiya/yabai) development closely ever since it was called kwm and saw the limitations of macOS's public API to managing windows.
The windows with this parent process go here thing can be solved easily, and can even be done as a one-liner with yabai. Example of moving all the windows of Sublime Text to display 2:
It can even be automated by adding a rule in ~/.yabairc (although that might be undesirable as it will always be enforced even if you want to move the window manually):
Similar with code editors: it should be smart enough to re-arrange my docks based on screen size. When I have big screen, expand side and bottom sub-windows. When I’m just on laptop screen, auto hide them.