added wild-card handling for tags
Anselm R Garbe garbeam@gmail.com
Thu, 15 May 2008 10:47:26 +0100
1 files changed,
6 insertions(+),
2 deletions(-)
jump to
M
dwm.c
→
dwm.c
@@ -240,7 +240,7 @@ /* function implementations */
void applyrules(Client *c) { - unsigned int i; + unsigned int i, j; Bool matched = False; Rule *r; XClassHint ch = { 0 };@@ -254,7 +254,11 @@ && (!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) { - c->tags[idxoftag(r->tag)] = True; + if(r->tag[0] == '*' && r->tag[1] == 0) + for(j = 0; j < LENGTH(tags); i++) + c->tags[j] = True; + else + c->tags[idxoftag(r->tag)] = True; matched = True; } }