[xmonad] darcs patch: Add a LayoutCombinator class and a CombinedLayout and ...

Andrea Rossato mailing_list at istitutocolli.org
Tue Jan 29 18:00:40 EST 2008

On Tue, Jan 29, 2008 at 05:33:04PM -0500, Brent Yorgey wrote:
> On Jan 29, 2008 2:57 PM, Andrea Rossato <mailing_list at istitutocolli.org>
> wrote:
> > On Tue, Jan 29, 2008 at 08:41:28PM +0100, Andrea Rossato wrote:
> > > Tue Jan 29 20:29:03 CET 2008  Andrea Rossato <andrea.rossato at unibz.it>
> > >   * Add a LayoutCombinator class and a CombinedLayout and port
> > PerWorkspace to the new system
> >
> > just to let you know that this will be amended. I'm going to remove
> > the necessity of implementing doFirst (it was needed just to decide
> > which layout description to use)!
> >
> Yes, this is a problem with PerWorkspace in particular -- the description
> method is pure, but the chooser method must be in the X monad to have access
> to the current stackset, in order to figure out which workspace is current.
> So in order to get the description method right, the decision of chooser
> must be cached as part of the data type so that description can show the
> description for the correct layout.  This is what PerWorkspace used to do.

I don't know about the second issue, but this is not a big one, I
think: just provide your combineDescription method:

combineDescription :: (LayoutClass l1 a, LayoutClass l2 a) => lc a -> l1 a -> l2 a -> String

call the right "description l1" inside it and you should be done. Am I
missing something?

BTW, there shouldn't be awful layout combinators: if you cannot write
a cmobinator with that class probably the bug is in the class...;)

(and we can fix it!)


More information about the xmonad mailing list