Source: http://ubuntuforums.org/showthread.php?t=2004985
Anyhow, try this:
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 lines:
</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 <1> and <2> I can switch between single and dual monitor configuration.