Monday, January 26, 2015

Command to cycle displays

I have found here about Disper. See link for details.

It can be installed from Synaptic or the terminal.
The command to cycle between clone, extended, internal and external displays should be like this:
disper --cycle-stages='-e : -c : -S : -s' --cycle
In that case, it would extend to the right. To cycle between the same options but extend to the left:
disper --direction=left --cycle-stages='-e : -c : -S : -s' --cycle
The command can be then associated to a short-key.
Disper will detect displays and use the maximal resolutions by default. If no external display is connected, nothing will happen when the short-key is touched.


ALTERNATIVE: associate each xrandr display configuration to a different short-key.

1. Install lxrandr (a simple display manager).

2. Run it, chose the display configuration you want, save.

3. In a terminal:

gedit  ~/.config/autostart/lxrandr-autostart.desktop
4. Copy/Paste the xrandr command from the file above, and associate it with a short-hey.

5. Close that file.

Re-do steps 2 to 5 for each command / display configuration.

No comments:

Post a Comment