X.Org/Video mode switching using xrandr

Prerequisites
You must have a working X.Org server.

Installation
We need x11-apps/xrandr which is a primitive command line interface to RandR extension.

When installed, you can run xrandr without argument to see what it find:

You need to install 2 scripts in your path. I use $HOME/bin.

Make them executable:

Configuration
Insure you that $HOME/bin is in your path:

The important part is at the begining. If you don't see /home//bin, you must add it at the begining of your bash profile file:

You are done. Now you can begin to change the video mode with

and

The best thing to do it to associate them to some key binding. Please consult the documentation of your window manager/desktop for that.

Note
Those 2 scripts must work with any X.Org server and screen that support EDID. If you have defined custom modelines, they can even found, and use, more video modes than wanted.

In order to use only a subset of the available video modes, a solution is to hardcode the wanted video modes into the scripts. So, another version will follow when I am done with it.