I have a laptop which I want to have connected to an external monitor 99% of the time. The other 1% I would use its screen. I want the laptop to be closed (usually) to save space, and to use external KB/mouse. The external monitor supports a higher resolution than the laptop screen, so I won't use screen duplication, and extended desktop is annoying when one of the monitors can't be viewed, so also out of the question.
Is there a simple way to enable the external only configuration, but that would switch to the internal monitor when the external monitor is disconnected, like regular Ubuntu/Windows/etc provide?
In addition/alternatively, What software does regular Ubuntu or other linux distros use to enable this?