How can I configure Xorg so that when a certain external monitor is attached to my laptop via HDMI, that external monitor becomes the main monitor and the laptop monitor is switched off?
Obviously I would like the laptop monitor to switch back on when the external monitor is unplugged.
Also, if possible, I would like to have this behaviour to occur only when a certain monitor is used.