[Xmonad] darcs patch: support self-modifying layouts.
Donald Bruce Stewart
dons at cse.unsw.edu.au
Mon Jun 25 00:50:37 EDT 2007
> Hi all,
> Here's a patch to support self-modifying Layouts. The problem with the
> previous API was that there was no safe way to write a self-modifying
> layout, since there was no way for the layout to determine where (if
> anywhere) it was located in XState (or anywhere else). This patch makes
> doLayout return a (Maybe (Layout a)) which is treated as the modified
> version of the Layout if it's not Nothing.
> This isn't an ideal API, since it relies on the caller of doLayout checking
> its return value, and acting on it appropriately. But I don't know of a
> better way to do this, and at least this works. And since we won't have
> many Layouts in core, it shouldn't be hard to keep core bug-free, and
> LayoutHelpers has some code for assisting in writing layout modifiers. The
> really ugly stuff is in Decorations, where we return a Layout modifier and
> rely on our caller to make use of it. :( It seems like we really need some
> sort of a Layout monad, but I'm too tired to think more about this just
> Patches to XMonadContrib to follow...
> Sat Jun 23 13:14:47 PDT 2007 David Roundy <droundy at darcs.net>
> * support self-modifying layouts.
This looks reasonable, though there is some growing feature creep in
this layout stuff :)
Spencer , opinions?
More information about the Xmonad