X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=dwm.c;h=852f7ac946dc1e39bee8489f03d37675d19e6620;hb=146ff227fe0d231bcfc59268364461ab8850c5fe;hp=9acf30da47b46f70b38d2c09c09a9696c6cc76ec;hpb=0e21794e02069ae71a1e70f8d0c2c22c4d1050bc;p=dwm.git diff --git a/dwm.c b/dwm.c index 9acf30d..852f7ac 100644 --- a/dwm.c +++ b/dwm.c @@ -261,9 +261,9 @@ applyrules(Client *c) { XGetClassHint(dpy, c->win, &ch); for(i = 0; i < LENGTH(rules); i++) { r = &rules[i]; - if((r->title && strstr(c->name, r->title)) - || (ch.res_class && r->class && strstr(ch.res_class, r->class)) - || (ch.res_name && r->instance && strstr(ch.res_name, r->instance))) + if((!r->title || strstr(c->name, r->title)) + && (!r->class || (ch.res_class && strstr(ch.res_class, r->class))) + && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) { { c->isfloating = r->isfloating; if(r->tag) { @@ -1068,7 +1068,7 @@ monocle(void) { Client *c; for(c = clients; c; c = c->next) - if(isvisible(c)) + if((lt->isfloating || !c->isfloating) && isvisible(c)) resize(c, mox, moy, mow - 2 * c->bw, moh - 2 * c->bw, RESIZEHINTS); }