Comment 56 for bug 1292398

Revision history for this message
Sascha Heuterer (theanachron) wrote :

Hey guys, I've written a script https://github.com/Anachron/scripts/blob/master/display.sh which I invoke at the startup of my system https://github.com/Anachron/scripts/blob/master/startup.sh , which checks the system every second for changed display settings. (It will generate a list of attached screen devices and compare to the old list) If a change has been detected, it will check what displays are used and will setup a predefined behavior.

This works pretty well! Whenever I attach/detach screens from my pc, it will do as it says.
Also, the interval of 1 second may be overkill for you, but it doesn't need any CPU power (under 1%) and it seems very smooth.

You should run the command xrandr before using/modifying the display script to get a list of possible devices that you can use.
That's what always bothered me with linux, and that's my solution.

I hope you enjoy!