Re: [dwm] nmaster strikes back

From: Peter Hartlich <sgkkr_AT_hartlich.com>
Date: Wed, 11 Feb 2009 13:51:02 +0100

On 2009-02-11 9:56 +0100, Szabolcs Nagy wrote:
Hi,

> nice, but tweak() has too much magic (if there were many runtime
> tunable int parameters in dwm then it would be ok).

The nice thing about int + bounds checking is that it should be general
enough for other layout algorithms as well, even where they now might
use bools, chars, floats etc.

I have to agree though rel/abs handling does not belong in tweak() proper
and should be done by the caller instead.

>> Configuration example:
>> [...]

> this way master width cannot be set to a fixed value

{ MODKEY, XK_n, tweakmwp, {.v = (int[]){Abs, 60}} }

> is nmaster that useful?

It's pretty much essential for me on a small screen when I want to look
at two pieces of code at the same time.

>> keyboards thread. It also corrects a discrepancy between documentation and
>> code: mfact was described as [0.05..0.95], but was actually [0.1..0.9].

> nice catch, config.def.h or setmfact() should be fixed

Actually, now that adjustborder() gives an indication if there is more
than one tiled client, why not make the right boundary 100%? This way,
you get pure horizontal splitting (as was recently requested IIRC) for
free:

        #include <limits.h>
        ...
        { MODKEY, XK_x, tweakmn, {.v = (int[]){Abs, INT_MAX}} },
        { MODKEY, XK_x, tweakmwp, {.v = (int[]){Abs, 100}} },

With all that in mind, what do you think about the attached patch
(on top of the last)? It also does the bounds handling in tweak()
more constructively.

Regards,
Peter

Received on Wed Feb 11 2009 - 12:51:02 UTC

This archive was generated by hypermail 2.2.0 : Wed Feb 11 2009 - 13:00:05 UTC