Re: Issue 242 in xmonad: inter screen handling doesn't work with xrandr --right-of, works with --left-of

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Issue 242 in xmonad: inter screen handling doesn't work with xrandr --right-of, works with --left-of

codesite-noreply@google.com

Comment #1 on issue 242 by nwfilardo: inter screen handling doesn't work  
with xrandr --right-of, works with --left-of
http://code.google.com/p/xmonad/issues/detail?id=242

At least on my ThinkPad X200, the problem is that the LVDS output is not by  
default the primary display.  It appears that the particular xinerama calls  
xmonad makes do not enumerate displays in left-to-right order but in some  
other order (as might be obvious, I'm not an expert at X11).  Try  
running "xrandr --output LVDS --primary"; then -w should be the LVDS panel  
and -e should be the VGA output.

Reply | Threaded
Open this post in threaded view
|

Issue 242 in xmonad: inter screen handling doesn't work with xrandr --right-of, works with --left-of

codesite-noreply@google.com

Comment #2 on issue 242 by hramr... at gmail.com: inter screen handling  
doesn't work with xrandr --right-of, works with --left-of
http://code.google.com/p/xmonad/issues/detail?id=242

FWIW recent cards allow connecting 3 or possibly even 6 screens with the  
outputs being numbered at random by the driver (no apparent pattern,  
depends on card make, model, revision, ..)

To get predictable behaviour XMonad should detect the virtual screen layout  
using xrandr and present the screens in order derived from the place they  
appear in the virtual screen.

You possibly could make a script that numbers your outputs by calling  
--primary as many times as there are screens to shift each screen to the  
top in order but there is no guarantee that this will give you any  
particular order, only that the "primary" is first.

Maybe I could try with 3 screens to find out if the order is just rotated  
or if you can really get the screens in different order.



Reply | Threaded
Open this post in threaded view
|

Issue 242 in xmonad: inter screen handling doesn't work with xrandr --right-of, works with --left-of

codesite-noreply@google.com
Updates:
        Status: Accepted
        Owner: vogt.a... at gmail.com
        Labels: Priority-Medium Type-Defect Usability

Comment #3 on issue 242 by vogt.a... at gmail.com: inter screen handling  
doesn't work with xrandr --right-of, works with --left-of
http://code.google.com/p/xmonad/issues/detail?id=242

I can't test this at the moment, but does the following module make the  
order sensible? You can drop it into ~/.xmonad/lib/WSOrder.hs, then use an  
xmonad.hs like the example in there.

Doing this in core shouldn't at more than a line for the actual logic,  
which is to "sortBy (comparing rect_x)".

Attachments:
        WSOrder.hs  2.4 KB



Reply | Threaded
Open this post in threaded view
|

Issue 242 in xmonad: inter screen handling doesn't work with xrandr --right-of, works with --left-of

codesite-noreply@google.com

Comment #4 on issue 242 by hramr... at gmail.com: inter screen handling  
doesn't work with xrandr --right-of, works with --left-of
http://code.google.com/p/xmonad/issues/detail?id=242

It does not compile for me

Error detected while loading xmonad configuration file:  
/home/hramrach/.xmonad/xmonad.hs

lib/WSOrder.hs:55:5:
     Couldn't match expected type `M.Map (KeyMask, key) (X ())'
                 with actual type `Query (Data.Monoid.Endo WindowSet)'
     Expected type: M.Map (KeyMask, key) (X ())
       Actual type: ManageHook
     In the expression:
         orderedScreenKeys (onWs f1) (modMask xconf, ks)
       <+>
         orderedScreenKeys (onWs f2) (modMask xconf .|. shiftMask, ks)
     In an equation for `shiftDiff':
         shiftDiff f1 f2 ks xconf
           = orderedScreenKeys (onWs f1) (modMask xconf, ks)
           <+>
             orderedScreenKeys (onWs f2) (modMask xconf .|. shiftMask, ks)

Please check the file for errors.




Reply | Threaded
Open this post in threaded view
|

Issue 242 in xmonad: inter screen handling doesn't work with xrandr --right-of, works with --left-of

codesite-noreply@google.com

Comment #5 on issue 242 by vogt.a... at gmail.com: inter screen handling  
doesn't work with xrandr --right-of, works with --left-of
http://code.google.com/p/xmonad/issues/detail?id=242

It should work with 0.9.* if you import Data.Monoid(mappend), then change  
<+> to `mappend` like:

shiftDiff f1 f2 ks xconf
           = orderedScreenKeys (onWs f1) (modMask xconf, ks)
           `mappend`
             orderedScreenKeys (onWs f2) (modMask xconf .|. shiftMask, ks)



Reply | Threaded
Open this post in threaded view
|

Issue 242 in xmonad: inter screen handling doesn't work with xrandr --right-of, works with --left-of

codesite-noreply@google.com
Updates:
        Status: Verified

Comment #6 on issue 242 by vogt.a... at gmail.com: inter screen handling  
doesn't work with xrandr --right-of, works with --left-of
http://code.google.com/p/xmonad/issues/detail?id=242

This contrib module looks like it addresses all concerns voiced:

http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-PhysicalScreens.html