udev-monitor-hotplug
udev-monitor-hotplug copied to clipboard
Improvement to work with some distros
I recently encountered a situation where the monitor-hotplug.sh was being called before the relevant info was available to execute it correctly and it was causing the script not to work even with attempts to nohup the xrandr statements to allow data to populate (specifically, in Qubes OS). The fix was to create a second script that simply scheduled the script to run immediately but in a separate process. I figured this info would be useful and perhaps a companion script or section in the readme appropriate to cover more distros.
at now -f "/usr/local/lib/monitor-hotplug.sh
On a similar note, after reading this I tacked a sleep 10
towards the top of the file to give my USBC displayport connected monitor some time to initialize and it works very well.