Re: [dev] A general approach to master-slave layouts

From: lolilolicon <>
Date: Mon, 7 Nov 2011 11:15:05 +0800

On Mon, Nov 7, 2011 at 3:28 AM, Connor Lane Smith <> wrote:
> Hey,
> I've been thinking about this patch for a while, and I've knocked
> together a patch which takes an alternative approach, which seems to
> result in a simpler diff.
> In my patch each layout has three arrangement functions, one for the
> master, one the slave, and one a 'meta-layout' which defines how the
> master and slave "booths" are laid out. So dwm's tile() is achieved
> with an htile() meta-layout and vtile() master and slave.
> The patch is +12 lines over dwm tip.
> Thanks,
> cls

This is nice.
I've played around with it, and have had some progress:

  * Fixed the nmaster == 0 case. The original patch would create an empty
    master area.

  * Expoit the mfact < 0 possibility. When mfact is set to negative, use
    the slave area as master area, and vice versa. This makes it possible
    to put masters on the right in tile, for example. Adjusting setmfact()
    for this, for now, but we should probably make this more flexible...

  * Port my original spiral layout to play with this patch.

I've attached the patch and the spiral layout as attachments.

And a question. What is your plan on dealing with mfact/nmaster? As I've
always insisted, they should be both monitor- and layout-specific. What's
your opinion, and how would you approach this?


Received on Mon Nov 07 2011 - 04:15:05 CET

This archive was generated by hypermail 2.3.0 : Mon Nov 07 2011 - 04:24:03 CET