I resolved in this way:
I created two scripts in the .screenlayout/ directory with the help of ARandR:
Code:
~/.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><1> and <super><2> I can switch between single and dual monitor configuration.
I hope this will be useful for others!