News for hackers. Stuff that matters.
Re:Show HN: Change screen layout when connecting/disconnecti... by larkery on Tuesday April 26, 2016 @09:35AM (#11571694)
I have a little python script to do a similar thing:

https://github.com/larkery/nix-session/blob/master/scripts/d...

This remembers the randr state that's associated with plugged in displays by their EDID and the ACPI lid switch. When you change the randr state, it remembers it, and when you change what displays are connected or open the laptop lid, it loads a previously remembered state if there is one. The state saving and loading is done by arandr, which handles the resolution, position, and choice of primary output.

Re:Show HN: Change screen layout when connecting/disconnecti... by betimsl on Tuesday April 26, 2016 @09:53AM (#11571823)
I used a bash script to do this, until I got a laptop that has only a mini-display port. Now I don't/can't connect to anything :(
Re:Show HN: Change screen layout when connecting/disconnecti... by qwertymaster on Tuesday April 26, 2016 @10:03AM (#11571925)
Why? you would've needed a cable anyway, so not owning the right one is no excuse, (m)DP can connect to pretty much anything using cheap _passive_ adapter cables.