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

Quentin Moser quentin.moser at unifr.ch
Tue Jan 27 20:47:04 EST 2009


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 =).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: messagecontrol.dpatch
Type: application/octet-stream
Size: 24792 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20090128/a5f3e236/messagecontrol-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: publicnowrap.dpatch
Type: application/octet-stream
Size: 20866 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20090128/a5f3e236/publicnowrap-0001.obj


More information about the xmonad mailing list