add taglayouts patch
This commit is contained in:
parent
31e3dd85c2
commit
c354d720b6
|
@ -35,6 +35,7 @@ static char *colors[][3] = {
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
static const char *tags[] = { "", "", "", "", "", "", "", "", "", "0", "-", "=" };
|
static const char *tags[] = { "", "", "", "", "", "", "", "", "", "0", "-", "=" };
|
||||||
|
static const int taglayouts[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
static const Rule rules[] = {
|
static const Rule rules[] = {
|
||||||
/* xprop(1):
|
/* xprop(1):
|
||||||
|
|
4
config.h
4
config.h
|
@ -35,6 +35,7 @@ static char *colors[][3] = {
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
static const char *tags[] = { "", "", "", "", "", "", "", "", "", "0", "-", "=" };
|
static const char *tags[] = { "", "", "", "", "", "", "", "", "", "0", "-", "=" };
|
||||||
|
static const int taglayouts[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
static const Rule rules[] = {
|
static const Rule rules[] = {
|
||||||
/* xprop(1):
|
/* xprop(1):
|
||||||
|
@ -134,9 +135,6 @@ static const Key keys[] = {
|
||||||
{ SUPERKEY, XK_h, setmfact, {.f = -0.05} },
|
{ SUPERKEY, XK_h, setmfact, {.f = -0.05} },
|
||||||
{ SUPERKEY, XK_l, setmfact, {.f = +0.05} },
|
{ SUPERKEY, XK_l, setmfact, {.f = +0.05} },
|
||||||
{ SUPERKEY|ShiftMask, XK_Return, zoom, {0} },
|
{ SUPERKEY|ShiftMask, XK_Return, zoom, {0} },
|
||||||
{ SUPERKEY, XK_Tab, view, {.ui = 0 } }, // next tab
|
|
||||||
{ SUPERKEY|ShiftMask, XK_Tab, view, {.ui = -1 } }, // prev tab
|
|
||||||
{ SUPERKEY|ControlMask, XK_Tab, view, {.ui = -2 } }, // last tab
|
|
||||||
{ SUPERKEY, XK_q, killclient, {0} },
|
{ SUPERKEY, XK_q, killclient, {0} },
|
||||||
{ SUPERKEY, XK_t, setlayout, {.v = &layouts[1]} },
|
{ SUPERKEY, XK_t, setlayout, {.v = &layouts[1]} },
|
||||||
{ SUPERKEY, XK_f, setlayout, {.v = &layouts[2]} },
|
{ SUPERKEY, XK_f, setlayout, {.v = &layouts[2]} },
|
||||||
|
|
19
dwm.c
19
dwm.c
|
@ -688,9 +688,9 @@ createmon(void)
|
||||||
m->showextrabar = showextrabar;
|
m->showextrabar = showextrabar;
|
||||||
m->topbar = topbar;
|
m->topbar = topbar;
|
||||||
m->gappx = gappx;
|
m->gappx = gappx;
|
||||||
m->lt[0] = &layouts[0];
|
// m->lt[0] = &layouts[0];
|
||||||
m->lt[1] = &layouts[1 % LENGTH(layouts)];
|
// m->lt[1] = &layouts[1 % LENGTH(layouts)];
|
||||||
strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
|
// strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
|
||||||
m->pertag = ecalloc(1, sizeof(Pertag));
|
m->pertag = ecalloc(1, sizeof(Pertag));
|
||||||
m->pertag->curtag = m->pertag->prevtag = 1;
|
m->pertag->curtag = m->pertag->prevtag = 1;
|
||||||
|
|
||||||
|
@ -698,12 +698,23 @@ createmon(void)
|
||||||
m->pertag->nmasters[i] = m->nmaster;
|
m->pertag->nmasters[i] = m->nmaster;
|
||||||
m->pertag->mfacts[i] = m->mfact;
|
m->pertag->mfacts[i] = m->mfact;
|
||||||
|
|
||||||
m->pertag->ltidxs[i][0] = m->lt[0];
|
// m->pertag->ltidxs[i][0] = m->lt[0];
|
||||||
|
if (i >= 1) {
|
||||||
|
m->pertag->ltidxs[i][0] = &layouts[taglayouts[i-1]];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m->pertag->ltidxs[i][0] = &layouts[0];
|
||||||
|
}
|
||||||
m->pertag->ltidxs[i][1] = m->lt[1];
|
m->pertag->ltidxs[i][1] = m->lt[1];
|
||||||
m->pertag->sellts[i] = m->sellt;
|
m->pertag->sellts[i] = m->sellt;
|
||||||
|
|
||||||
m->pertag->showbars[i] = m->showbar;
|
m->pertag->showbars[i] = m->showbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m->lt[0] = m->pertag->ltidxs[1][0];
|
||||||
|
m->lt[1] = &layouts[1 % LENGTH(layouts)];
|
||||||
|
strncpy(m->ltsymbol, m->pertag->ltidxs[1][0]->symbol, sizeof m->ltsymbol);
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue