I have 2 displays for my computer, and a lot of times I need to change the configuration (from extended desktop to single desktop, changing wich one is the main screen, etc etc)
I wonder if there is a way to save and load these configurations for quick access in the future. I am aware of the existence of xrandr
and I know it will probably be possible to write an alias for each setting, just wondering if there is an easier way or am I going to read the manual for it and do it that way.
Install arandr
It is a graphical application where you can set all your screens in the way you want, apply the settings and afterwards you can save the settings (File -> Save As).
The best thing is that the settings are in fact saved as shell scripts with the needed
xrandr
command that applies your configuration. Since they are plain text files you can open them in the favorite text editor to learn the syntax forxrandr
or to modify them to your liking. In the end you can assign keyboard shortcuts to these shell scripts (either viaarandr
or via the general keyboard configuration tool), or you can add them to the menus for easy access.For example, I have a script initially made with
arandr
that extends the screen to the right and later modified it manually to also change Broadcast-RGB to Full for some of the monitors I use where the Auto setting does not work properly.The
arandr
script looks like this, so as you see it is a singlexrandr
command, so once you learn how to do itarandr
will no longer be needed.If you prefer the commandline, you can use https://github.com/phillipberndt/autorandr for the same purpose.