On Tue, May 13, 2008 at 09:06:22PM -0700, Eric Davis wrote: > DWM used to support regular expressions in the tags ref for client > rules. I agree that the feature was overkill but it was nice to be able > to say "*" so a client is on all tags. I used this for background > notification popups from scripts with gxmessage. > > Is it possible to add a simple glob indicator back to DWM that specifies > all tags? Or is there another way to do this that I overlooked...?
See attached patch, however I'm not sure I like this approach for the mainstream dwm. If you want the behavior it is possible with the following approach already in mainstream dwm, but you might not like it: { NULL, "gxmessage", NULL, tags[0], True }, { NULL, "gxmessage", NULL, tags[1], True }, { NULL, "gxmessage", NULL, tags[2], True }, { NULL, "gxmessage", NULL, tags[3], True }, ... { NULL, "gxmessage", NULL, tags[8], True }, Kind regards, -- Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361
diff -r 58a67fab8143 -r b9bb1d036bd0 dwm.c --- a/dwm.c Wed May 14 11:24:35 2008 +0100 +++ b/dwm.c Thu May 15 10:47:26 2008 +0100 @@ -240,7 +240,7 @@ Window root, barwin; void applyrules(Client *c) { - unsigned int i; + unsigned int i, j; Bool matched = False; Rule *r; XClassHint ch = { 0 }; @@ -254,7 +254,11 @@ applyrules(Client *c) { && (!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; } }