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

From: Rob <robpilling_AT_gmail.com>
Date: Mon, 31 Oct 2011 23:36:06 +0000

On 31 October 2011 23:07, lolilolicon <lolilolicon_AT_gmail.com> wrote:
> Indeed mfact and nmaster being members of Layout does make more sense, and
> I made a patch which includes this change.
> Note that this may seem to add some SLOCs, but it actually reduces the
> amount of code required to implement the same layouts by avoiding code
> duplication.  See how tile, bstack and col are each defined using just a
> one-liner.  By defining two layout algorithms `lt_vstack` and `lt_hstack`,
> in combination with the hsplit switch, one can define 2 ** 2 * 2 = 8 such
> layouts, and if you count the (masters|slaves)-only layouts as separate
> ones, we got 10.  Add a third layout algorithm, and you have
> 3 ** 2 * 2 + 3 = 21.  Sure, not all layouts are useful for everyone, but
> hopefully this will produce some interesting layouts suitable for your
> particular setup.

I don't have much time today, or possibly tomorrow, but I'm interested
in this patch, it sounds almost like it recurses on each sub-section of
the total area, applying a different layout function each time, except
it's limited to two calls, one for the master area and one for the
slave. Either way, I'm hoping to try out your patch(es) at some point
this week, and hoping to mess around with the key bindings, I assume you
can change the master layout while keeping the slave one the same with a
binding, right?

Cheers,
Rob
Received on Tue Nov 01 2011 - 00:36:06 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 01 2011 - 00:48:04 CET