[xmonad] Xmonad and multiple screens

Jakob Schöttl jschoett at gmail.com
Mon Jun 6 05:31:10 UTC 2016


Hi Yuriy,

I have a similar setup on my ThinkPad, but I use three monitors.

What I do first, is disable all outputs (I had other kind of problems 
before):

     xrandr  --output $left     --off
     xrandr  --output $right    --off
     xrandr  --output $primary  --off
     xrandr  --output $primary  --auto
     xrandr  --output $right    --auto  --left-of $primary
     xrandr  --output $left     --auto  --left-of $right

You press mod+shift+{w,e,r} to shift a window to another screen, don't you?

I copied and adapted this key bindings from the default config for a 
different keyboard layout:

     -- mod-{i,a,e} %! Switch to physical/Xinerama screens 1, 2, or 3
     -- mod-shift-{i,a,e} %! Move client to screen 1, 2, or 3
     [ (mod ++ key, screenWorkspace sc >>= flip whenJust (windows . f))
         | (key, sc) <- zip ["i", "a", "e"] [2, 0, 1] -- [0..] is weired!
         -- now middle finger (a) is primary (laptop) monitor,
         -- pointer finger (e) is second (external) monitor
         , (f, mod) <- [(W.view, "M-"), (W.shift, "M-S-")]
     ]

My xrandr -q output looks similar to your's:

Screen 0: minimum 8 x 8, current 5520 x 1080, maximum 32767 x 32767
eDP1 connected 1920x1080+3600+0 (normal left inverted right x axis y 
axis) 309mm x 173mm
    1920x1080     60.05*+
    1400x1050     59.98
    1600x900      60.00
    1280x1024     60.02
    1280x960      60.00
    1368x768      60.00
    1280x720      60.00
    1024x768      60.00
    1024x576      60.00
    960x540       60.00
    800x600       60.32    56.25
    864x486       60.00
    640x480       59.94
    720x405       60.00
    640x360       60.00
DP1 disconnected (normal left inverted right x axis y axis)
DP2 connected 1680x1050+1920+0 (normal left inverted right x axis y 
axis) 474mm x 296mm
    1680x1050     59.88*+  59.95
    1280x1024     75.02    60.02
    1440x900      74.98    59.89
    1280x960      60.00
    1152x864      75.00
    1024x768      75.08    60.00
    832x624       74.55
    800x600       75.00    60.32    56.25
    640x480       75.00    60.00
    720x400       70.08
HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 
530mm x 300mm
    1920x1080     60.00*+
    1600x1200     60.00
    1680x1050     59.88
    1280x1024     60.02
    1440x900      59.90
    1280x960      60.00
    1280x800      59.91
    1024x768      60.00
    800x600       60.32    56.25
    640x480       60.00
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)


Cheers, Jakob

Am 06.06.2016 um 07:14 schrieb Yuriy Halytskyy:
> I am trying to use xmonad on a laptop connected to two monitors, via 
> VGA and HDMI outputs. Laptop screen is disabled and both external 
> monitors configured using xrandr:
>
> xrandr --output LVDS1 --off
> xrandr --output HDMI-0 --right-of VGA1
> xrandr --output VGA1 --right-of LVDS1
>
>
>
>   But mod+{w,e,r} does not work and the only way to have windows on 
> one of my screens is to move floating window. Xinerama shows only 
> right monitor:
> ghc -e "Graphics.X11.openDisplay [] >>= 
> Graphics.X11.Xinerama.getScreenInfo"
> [Rectangle {rect_x = 1920, rect_y = 0, rect_width = 1920, rect_height 
> = 1200}]
>
> Is it possible to somehow overwrite getScreenInfo for xmonad or 
> configure Xinerama propertly?
>
> nvidia-setting can only see one screen and one display.
> xrandr output shows one huge 3840 x 1200 display and all screens:
>
> Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 16384 x 16384
> LVDS-0 disconnected primary (normal left inverted right x axis y axis)
> DP-0 disconnected (normal left inverted right x axis y axis)
> DP-1 disconnected (normal left inverted right x axis y axis)
> HDMI-0 connected 1920x1200+1920+0 (normal left inverted right x axis y 
> axis) 518mm x 324mm
>    1920x1200      60.0*+
>    1920x1080      60.0
>    1680x1050      60.0
>    1600x1200      60.0
>    1280x1024      60.0
>    1280x960       60.0
>    1024x768       60.0
>    800x600        60.3
>    640x480        59.9
> DP-2 disconnected (normal left inverted right x axis y axis)
> DP-3 disconnected (normal left inverted right x axis y axis)
> LVDS1 connected
>    1600x900       60.0 +   40.0
>    1440x900       59.9
>    1360x768       59.8     60.0
>    1152x864       60.0
>    1024x768       60.0
>    800x600        60.3     56.2
>    640x480        59.9
> VGA1 connected 1920x1200+0+0 518mm x 324mm
>    1920x1200      60.0*+
>    1920x1080      60.0
>    1680x1050      60.0
>    1600x900       60.0
>    1280x1024      60.0
>    1440x900       59.9
>    1280x800       59.8
>    1280x720       60.0
>    1024x768       60.0
>    800x600        60.3     56.2
>    640x480        60.0
> VIRTUAL1 disconnected
>   1024x768 (0x2ce)   65.0MHz
>         h: width  1024 start 1048 end 1184 total 1344 skew 0 clock   
> 48.4KHz
>         v: height  768 start  771 end  777 total 806           clock   
> 60.0Hz
>   800x600 (0x2cf)   40.0MHz
>         h: width   800 start  840 end  968 total 1056 skew 0 clock   
> 37.9KHz
>         v: height  600 start  601 end  605 total 628           clock   
> 60.3Hz
>   640x480 (0x2d0)   25.2MHz
>         h: width   640 start  656 end  752 total  800 skew 0 clock   
> 31.5KHz
>         v: height  480 start  490 end  492 total 525           clock   
> 59.9Hz
>   1920x1200 (0x2c8)  154.0MHz
>         h: width  1920 start 1968 end 2000 total 2080 skew 0 clock   
> 74.0KHz
>         v: height 1200 start 1203 end 1209 total 1235           
> clock   60.0Hz
>   1680x1050 (0x2ca)  146.2MHz
>         h: width  1680 start 1784 end 1960 total 2240 skew 0 clock   
> 65.3KHz
>         v: height 1050 start 1053 end 1059 total 1089           
> clock   60.0Hz
>   1280x1024 (0x2cc)  108.0MHz
>         h: width  1280 start 1328 end 1440 total 1688 skew 0 clock   
> 64.0KHz
>         v: height 1024 start 1025 end 1028 total 1066           
> clock   60.0Hz
>
>
> Cheers,
> Yuriy
>
>
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20160606/45097fcf/attachment.html>


More information about the xmonad mailing list