[xmonad] patch: New XMonad.Layout.MessageControl module.

Don Stewart dons at galois.com
Sun Feb 8 14:46:35 EST 2009


Who's the LayoutCombinators czar?

quentin.moser:
> Hi,
> 
> These patches provide a message escape/filtering facility intended to
> make it easier to control complex nested layouts via messages.
> 
> 
> 
> The first one provides "unEscape" and "ignore" modifiers you could use
> to write something like this:
> 
> > import XMonad.Layout.MessageControl
> >
> > myLayout = Full ||| gimp ||| ...
> >     where gimp = ignore NextLayout $ ignore JumpToLayout $ unEscape $
> >                  mastered 0.01 0.2 (simpleTabbed ||| Grid)
> >
> > nextOuterLayout = sendMessage NextLayout
> > nextInnerLayout = sendMessage $ escape NextLayout
> 
> (see the XMonad.Layout.MessageControl patch for details. For
> clarification, "ignore" blocks all messages of the _same type_ as its
> parameter.)
> 
> 
> 
> However, neither XMonad.Layout.(|||) nor
> XMonad.Layout.LayoutCombinators.(|||) can be used with this, because
> they both send messages (NextLayoutNoWrap) which have a private type and
> therefore cannot be filtered.
> 
> Thus the patch to X.L.LayoutCombinators, which moves the
> NoWrap messages from their own type into the JumpLayout type, so that
> they can now be intercepted with "ignore JumpToLayout".
> 
> I also made these constructors public because I don't like exporting
> data types with only part of their constructors, but that's not
> actually necessary and can be reverted if wanted.
> 
> 
> 
> ...
> 
> Also, when adding these modifiers into my Big Monstrous LayoutHook of
> Hell I had to add an {-# OPTIONS_GHC -fcontext-stack=40 #-} pragma to
> my xmonad.hs to prevent a context reduction overflow =).


> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad



More information about the xmonad mailing list