On Sun 03 Jun 2018 at 12:45:28 (-0500), Paul Johnson wrote: > On Sun, Jun 3, 2018 at 12:15 PM, Charlie Gibbs <cgi...@surfnaked.ca> wrote: > > > On 03/06/18 08:45 AM, Paul Johnson wrote: > > > > I have a laptop that I frequently use with an external monitor, but on > >> the lefthand side. Now by default, XFCE assumes that I want the monitor > >> to be on the right, and the top of the laptop to be even with the top of > >> the external monitor. I would love it if there's a way to get it to > >> assume I want the external monitor on the left with the laptop > >> bottom-justified to that instead. What's the best way to accomplish this? > >> > > > > Check out the xrandr man page. I have two dissimilar monitors on my > > desktop and ensure that they're properly set up as follows: > > > > xrandr --output DVI-I-1 --mode 1920x1080 > > xrandr --output DVI-I-2 --mode 1280x1024 --right-of DVI-I-1 > > > > That --right-of parameter tells it that my smaller monitor is to the right > > of my larger one - I could use --left-of if I wanted it on the other side. > > I'm not sure how you'd do justification, though. > > > I was hoping for something along the lines of getting XFCE's settings to > cooperate on that, like, remember which side it should be on persistently. > This is a monitor that gets plugged and unplugged regularly, not one that > stays permanently attached.
I use a different approach which is more flexible (unless I've missed something about xrandr) but I restart the Xserver when I'm changing the setup (*to* two screens, but not when reverting to one). I don't use a Desktop Environment. I use bash functions to clear and then copy the appropriate set of files to /etc/X11/xorg.conf.d/ from this selection (basically one of each number): /etc/X11/xorg.conf.d/mirrored/10-panelnative.conf : Section "Monitor" Identifier "eDP1" Modeline "1600x900x60.0" 115.20 1600 1664 1706 2000 900 903 906 960 -hsync -vsync Option "PreferredMode" "1600x900x60.0" EndSection /etc/X11/xorg.conf.d/sidebyside/10-panelmidres.conf : Section "Monitor" Identifier "eDP1" Modeline "1368x768x60.0" 85.86 1368 1440 1584 1800 768 769 772 795 -hsync +vsync Option "PreferredMode" "1368x768x60.0" EndSection /etc/X11/xorg.conf.d/sidebyside/20-kitchentv.conf : Section "Monitor" Identifier "HDMI1" Modeline "1368x768x60.0" 85.86 1368 1440 1584 1800 768 769 772 795 -hsync +vsync Option "PreferredMode" "1368x768x60.0" Option "Position" "1368 0" EndSection /etc/X11/xorg.conf.d/sidebyside/20-othertv.conf : Section "Monitor" Identifier "HDMI1" Modeline "1600x900x60.0" 108.00 1600 1624 1704 1800 900 901 904 1000 +hsync +vsync Option "PreferredMode" "1600x900x60.0" Option "Position" "1600 0" EndSection /etc/X11/xorg.conf.d/sidebyside/20-viewsonic.conf : Section "Monitor" Identifier "HDMI1" Modeline "1152x864x75.0" 108.00 1152 1216 1344 1600 864 865 868 900 +hsync +vsync Option "PreferredMode" "1152x864x75.0" Option "Position" "1600 0" EndSection /etc/X11/xorg.conf.d/all/30-devicecard.conf : Section "Device" Identifier "Card0" Driver "Intel" BusID "PCI:0:2:0" EndSection /etc/X11/xorg.conf.d/all/40-screenpanel.conf : Section "Screen" Identifier "Internal" Device "Card0" Monitor "eDP1" DefaultDepth 24 EndSection /etc/X11/xorg.conf.d/all/50-screenhdmi.conf : Section "Screen" Identifier "External" Device "Card0" Monitor "HDMI1" DefaultDepth 24 EndSection As it happens, I use the laptop to the left in each case, so my Position option is always in the HDMI monitor and positive. You would either want to insert a minus sign, or move the option to the other Monitor section to reverse things; either method works. Why don't I do all this on the fly? Mainly because my .xsession looks at the resolution and starts up all my (~20) xterms with font sizes, geometries and positions as appropriate, and also writes some little helper files for fvwm to be able to move particular windows back to their "reset" positions automatically on command (clocks, players, controls etc). Cheers, David.