I like to have an external monitor hooked up from time to time, but I keep the monitor in portrait mode. I have i3 running with xfce utilities. Every time I hook up the monitor it sets it to landscape mode and arranges the screens so that the top of each screen lines up, but I want the bottoms of the screens to line up. So every I hook it up, I have to manually rotate the external monitor and then align it to my preference. Is it possible to do this automatically or save my settings in "xfce display settings" or which a script (shortcut assigned)

    Default                       My Preference
[     ] [         ]                       [    ]
[ Lap ] [ Monitor ] <= Landscape  [     ] [Moni]  <= Portrait
        [         ]               [ Lap ] [    ]

You might try the following command for your script:

xrandr --output MONITORNAME --rotate right

To find out your monitor name, examine the output of:

xrandr | grep connected

Monitor names look like LVDS (usually the internal screen), VGA-0, HDMI-0, etc.

If you aren't sure which monitor is which, try one; --rotate normal will put it back the way it was in case you have the wrong one. And depending on your monitor orientation, you might need --rotate left instead of right.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.