[dev] Initialize layouts

From: Scott <outrageousfury_AT_gmail.com>
Date: Fri, 22 Oct 2010 16:52:56 +0200

I have got dwm configured with the push,cycle,resize and pertag
patches, but now I'd like every single tag to have it's own default
layout. I've tried to following, but it doesn't work correct.

 /* init layouts */
 for(m = mons; m; m = m->next) {
   for(i=0; i < LENGTH(tags) + 1; i++) {
     m->lts[i] = initlayouts[i] && initlayouts[i] < LENGTH(layouts) ? &layouts$
   }
 }

But for some reason this doesn't work. I want the second and third tag
(Browser, and Chat) to use layout two by default, but in order to
achieve this I have to configure it as the following:
static const int initlayouts[] = { 0, 0, 2, 2, 0, 0 };

that doesn't really make sense since this is my tag config:
static const char *tags[] = { "Dev", "Browsing", "Chat", "Multimedia",
"Virtualization", "Misc" };

config.h: http://pastie.org/private/gszqqcftgbnhd2vij3a9g
dwm.c: http://pastie.org/private/oy4f5hyhnrhqqkv2fq56a #1560
Received on Fri Oct 22 2010 - 16:52:56 CEST

This archive was generated by hypermail 2.2.0 : Fri Oct 22 2010 - 17:00:04 CEST