Monitor-specific window layout?

I frequently need to connect/disconnect my Mac laptop to/from a larger monitor. I'd like to be able to remember where I like the windows when the monitor is connected (vs when Is there a way to (a) create/restore window positions that are specific to using Mac alone vs in clamshell mode, and (b) auto-trigger the right layout when the monitor is connected/disconnected.
Is this possible?
Thank you!

You can use the "Save / Restore Specific Window Layout" action and assign it to different triggers / shortcuts.

However currently automatic switching is not possible.