You remember that cool hack about switching monitor using i3nagbar I posted a few months ago? If you don’t, it’s about two posts down from here.
Meanwhile I’ve come up with something even better. I wanted to have a look at Python and Gtk, so I re-implemented the hack with a nicer GUI and more features.
So here is randrpresets! It’s on my github for you to use and fork. The idea is as follows: Bind it to a hotkey – if you want to plug in an extra monitor, hit that hotkey once, the dialog pops up and you just click the screen setup you like (say, laptop screen plus projector on VGA). That’s all.
The little tool allows you to add new presets with a click and customize them with a few more clicks. It also allows you to specify a post-command which is executed after a new preset is applied, e.g. for re-fitting your nice wallpaper or getting that lazy docking station keyboard to work. You can save your presets to a config file, and since everything can be edited with a few clicks, you won’t ever have to open that file in a text editor (but you can, it’s just JSON).
Other than that, randrpresets pretty much tries to get out of your way. It closes the instant a new preset is applied, and there’s none of that rotation and screen flipping stuff you never need. I’m planning to distinguish between right-of and left-of though (at the moment all the outputs are just a long chain of right-of entries).