At work I have both screens on permanently but at home I don't need this. I just use the laptop screen for watching sport or maybe some documentation etc. Just being able to blank the screen would work just as well I guess, for example if I could turn the brightness down to zero so the screen just goes black. Actually, is there a way of doing this? The brightness control at the moment just makes the laptop go darker but not completely blanked out.
In Windows I go through the laborious process of setting the output and then re-arranging the monitor positions. I use Arch more so would love a permanent simple solution - hence the idea of having screenOn / screenOff scripts.
Richard
]]>You can also put xrandr commands in your xinitrc before the window manager starts.
I set up xorg.conf because of slim, so same difference. Otherwise it would have to do it again.
]]>That's a great reply, thanks. I did initially have the pos 1600x0 in the VGA settings and --pos 0x0 for the laptop. I swapped them around after reading somewhere that 0x0 was treated as the default monitor. Stupidly, until I read your comment, I hadn't realised that it was referring to co-ordinates on the screen. It also explains why, when I was experimenting, some windows were overlapping the 2 screens.
Thanks for your help.
Richard
]]>If you have only the VGA output on, the top left corner of the VGA monitor is 0x0. If you open a window, and it is placed 10 pixels in and down from the top left, it is at coordinates 10x10 in the x session. Then you turn on the laptop monitor and specify that the top left corner of the laptop monitor should now bo considered 0x0 - but nothing is done to move the windows, so the window with coordinates 10x10 is now near the top left of the laptop monitor.
I see 3 possible ways of acheiving what you want:
1) swap the "pos" parameters in your xrandr commands so that the monitor on the left is always at 0x0 and the one on the right is always at 1920x0 (or whatever). This will leave a large area of available X desktop that is not visible - I don't know how your window manager will treat this. It might try to map windows on the laptop screen space even though that screen is not on. I know openbox is easy to configure where it tries to place windows.
2) Keep the VGA monitor always at 0x0, but place the laptop monitor at a negative offset when you want it on. I don't actually know if X allows negative coordinates like that, but it's worth a shot.
3) Configure your window manager, or use a different window manager, so that it is aware of the two screens and treats them reasonably (e.g. moves windows when the desktop area is changed).
]]>I'm running a dual monitor setup - specifically a HP G72 laptop and a widescreen monitor. I use the monitor as the default and sometimes I want to use the Laptop as a secondary screen for watching TV etc. My desktop is Enlightenment, I just changed to it from Gnome. My issue is that I want the laptop to be on the left of the monitor - that's how it is physically positioned - but when I switch the Laptop screen on all my applications shift over to the laptop screen. I've written 2 scripts, attached to hotkeys, one to turn the laptop off and the other to turn the laptop on. The script to turn the laptop on is as follows:
xrandr --output LVDS1 --mode 1600x900 --pos 1600x0 --rotate normal
--output VGA1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --left-of LVDS1
This works fine, applications stay where they should be, except that the physical position is incorrect; VGA1 should be to the right of LVDS1 like this:
xrandr --output LVDS1 --mode 1600x900 --pos 1600x0 --rotate normal
--output VGA1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --right-of LVDS1
However, when I use the second script all of the applications shift to the laptop but at least the physical position is correct. The issue appears to be something to do with laptops, almost as though when it's a laptop the default monitor is forced to be on the left. Has anybody got any suggestions how to get around this issue?
Thanks
Richard