xmonad dual monitors

16,624

Solution 1

Did you try to configure xorg.conf with Xinerama? You need to enable Xinerama setting it to "true" in the xorg.conf file. By default it will be attributed one workspace to each monitor and you can switch the focus pressing mod-{w,e,r}. If you want to change any configuration you can find instructions here and if in trouble you can check solutions here.

Solution 2

There's an easy to use GUI called "arandr" for changing your monitor settings. It's a GUI frontend for the xrandr command line utility.

You can use the xrandr utility from command line to switch back and forth between single and dual screen. In my zshrc (or your Bash login file if you use Bash) I have defined the 'single()' and 'dual()' functions for this.

Your outputs will probably be different - I have one HDMI and one VGA - look for an xrandr tutorial for more detail. In this example, the VGA output is my primary monitor, and the HDMI monitor is to the right of my primary monitor.

# set dual monitors
dual () {
    xrandr --output VGA-0 --primary --left-of HDMI-0 --output HDMI-0 --auto
}

# set single monitor
single () {
    xrandr --output HDMI-0 --off
}

I like this because at any point I simply send the single or dual command to my terminal and turn my second monitor on and off.

Share:
16,624

Related videos on Youtube

amosrivera
Author by

amosrivera

Programmer at platan.us. Obsessed w/ puzzles and things.

Updated on September 18, 2022

Comments

  • amosrivera
    amosrivera over 1 year

    I have been giving the window manager Xmonad a try for a few days now on Ubuntu 11.04. I like it a lot but i just set up a second monitor and haven't found the way to configure Xmonad properly for this.

    What i'm trying to get is to set the second monitor as the second workspace. Anyone have any idea?

    Thanks.