Re: [dwm] 4.7 is delayed

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Sat, 10 Nov 2007 19:17:26 +0100

On Sat, Nov 10, 2007 at 11:29:56AM +0200, Szabolcs Nagy wrote:
> On 11/8/07, Anselm R. Garbe <arg_AT_suckless.org> wrote:
> > > const char *tags[] = {tag1, tag2, ..};
> > > Key keys[] = {{MODKEY,XK_1,view,tag1}, ..};
> >
> > That's uglier than the KEYS macro.
>
> ok a second try (prepare for uglyness)
>
> #define MAXTAGLEN 10
> const char tags[][MAXTAGLEN] = {"tag1", "work", "www", ..};
> Key keys[] = {{MODKEY, XK_1, view, tags[0]}, ..};
>
> it's a bit waste of space (sizeof tags == LENGTH(tags) * MAXTAGLEN)
> and one should set MAXTAGLEN properly (won't compile if it's too small)
> but it works

I like that idea, and I applied it to hg tip (which also allows
the revival of grabkeys()) :)

Regards,

-- 
 Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361
Received on Sat Nov 10 2007 - 19:17:26 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:05:32 UTC