2 ms·
I have a little python script to do a similar thing: https://github.com/larkery/nix-session/blob/master/scripts/displays https://github.com/larkery/nix-session
by larkery 10y ago
I have a little python script to do a similar thing:
https://github.com/larkery/nix-session/blob/master/scripts/displays 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.
- betimsl 10y agoI 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 :(
- qwertymaster 10y agoWhy? 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.