X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=dwm.c;h=27c4f92a32e29b506f0f3f5b91f42b2888046cd4;hp=8ade8d709da4c778d3fc26e16ed2a9cdf733c0d0;hb=63b3ab7e87e516c09ee9eb28354aa7b123640103;hpb=0bcbda6733cd666dac6bcae3fbee478df3da77ce diff --git a/dwm.c b/dwm.c index 8ade8d7..27c4f92 100644 --- a/dwm.c +++ b/dwm.c @@ -306,7 +306,7 @@ applyrules(Client *c) { for(i = 0; i < LENGTH(rules); i++) { r = &rules[i]; - if((!r->title || strstr(c->name, r->title)) + if((!r->title || c->name == strstr(c->name, r->title)) && (!r->class || strstr(class, r->class)) && (!r->instance || strstr(instance, r->instance))) { @@ -1635,6 +1635,17 @@ sigchld(int unused) { void spawn(const Arg *arg) { + int tag = 0, i; + if(arg->v == termcmd) { + for(i = 0; i < 32; ++i) { + if(selmon->tagset[selmon->seltags] & (1 << i)) { + tag = i; + break; + } + } + _SWM_WS[8] = swm_tags[tag][0]; + _SWM_WS[9] = swm_tags[tag][1]; + } if(arg->v == dmenucmd) dmenumon[0] = '0' + selmon->num; if(fork() == 0) { @@ -1676,7 +1687,7 @@ tile(Monitor *m) { if(n > m->nmaster) mw = m->nmaster ? m->ww * m->mfact : 0; else - mw = m->ww; + mw = m->ww * m->mfact; for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) if(i < m->nmaster) { h = (m->wh - my) / (MIN(n, m->nmaster) - i);