viernes, 15 de abril de 2016

Dual Monitor in LXDE

La clau està en instal·lar el arandr. Informació general aquí.

I created two scripts in the .screenlayout/ directory with the help of ARandR:



~/.screenlayout$ cat single.sh 
#!/bin/sh
xrandr --output LVDS1 --mode 1024x600 --pos 0x0 --rotate normal --output VGA1 --off
lxpanelctl restart

~/.screenlayout$ cat dual.sh 
#!/bin/sh
xrandr --output LVDS1 --mode 1024x600 --pos 0x0 --rotate normal --output VGA1 --mode 1920x1080 --pos 1024x0 --rotate normal
lxpanelctl restart

adding the string "lxpanelctl restart" by hand (ARandR doesn't do it). Then, in the file
~/.config/openbox/lxde-ec.xml
I added the following lines between two </keybind> lines:


Code:
  </keybind>
  <keybind key="W-2">
  <action name="Execute">
  <command>sh ~/.screenlayout/dual.sh</command>
  </action>
  </keybind>
  <keybind key="W-1">
  <action name="Execute">
  <command>sh ~/.screenlayout/single.sh</command>
  </action>
</keybind>

so that using <super(windws)><1> and <super(windws)><2> I can switch between single and dual monitor configuration.

I hope this will be useful for others!

No hay comentarios:

Publicar un comentario