I have something of an unusual setup with my Ubuntu desktop and Windows laptop. The two devices share two monitors, one main monitor using the monitor's input switch (DP for the desktop, HDMI for the laptop) and one secondary monitor switched using a KVM (HDMI for both.)
When I use my laptop during work hours, I set the main monitor to use HDMI from the laptop, and set my Ubuntu display configuration to only use the secondary KVM switched monitor as a single display. That way, if I need to swap to my desktop, I only need to mess with the KVM and I still have a monitor for my work laptop if needed.
The problem comes when it's time to shut off my laptop for the day. I turn off my laptop, swap my main monitor's input to DisplayPort, and it forgets all of the setup I put on before. When switching back to joined/extended displays, it will:
- set my secondary monitor as my primary display
- swap the position so the left (main) monitor is on the right and vice versa
- set my primary monitor's refresh rate to 60Hz instead of 144Hz
Is there any way to save a configuration so I can load all of this at once? I'd prefer if it could be done from the terminal, but as long as I don't have to go into the settings every time I switch from a single display to joined displays I'll be happy.
Here is the output of neofetch for my system specs/configuration.