

This was also my motivation for investigating this. With a script like the “enable-screens.sh” you can do runtime reconfiguration of the virtual displays. Apparently this only works if the kernel is not in a “lockdown” state. So this would depend on the distribution. And you have the “Switching the screens” section. It describes how to set up an application in Sunshine so that when you connect one screen turns of and back on again when you disconnect. I hope these two points fit your requirements.
Do they now have Linux support? I thought this was limited to Windows as host at this time?