Change XrandR setup on monitor unplugged/replugged

1

I'm specifically looking for a way to set up my laptop, when I unplug the external display, to reset the XrandR configuration so I'm only using 1 screen. Any advice?

Basically, I want an acpi event on display disconnect. Is there any way to do that?

Aviator45003

Posted 2014-05-27T00:47:05.460

Reputation: 444

Answers

0

You need to write an udev rule for your external displays which will trigger your script doing the changes. More explanation on this unix SE question and this blog post.

Zaroth

Posted 2014-05-27T00:47:05.460

Reputation: 401

Unfortunately, I don't get a udev event (according to the blog post). Is there another place I can look for a change? Maybe somewhere in the /proc hirearchy? – Aviator45003 – 2014-05-28T03:06:33.383