On Sat, Nov 10, 2007 at 11:29:56AM +0200, Szabolcs Nagy wrote:
> On 11/8/07, Anselm R. Garbe <[EMAIL PROTECTED]> 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

Reply via email to