diff -r ac233c362502 dwm.c --- a/dwm.c Sat Sep 22 21:55:19 2007 +0200 +++ b/dwm.c Sun Sep 23 01:42:54 2007 +0200 @@ -169,6 +169,7 @@ void setup(void); void setup(void); void spawn(const char *arg); void tag(const char *arg); +void tagall(const char *arg); unsigned int textnw(const char *text, unsigned int len); unsigned int textw(const char *text); void tile(void); @@ -1549,6 +1550,30 @@ tag(const char *arg) { arrange(); } +void +tagall(const char *arg) { + if (!clients) + return; + int floating_only = arg && arg[0] == 'F' ? 1 : 0; + int tag = arg ? atoi(arg + floating_only) : 0; + int j; + Client* c; + if(tag >= 0 && tag < LENGTH(tags)) + for(c = clients; c; c = c->next) + { + if(!floating_only || c->isfloating) + for(j = 0; j < LENGTH(tags); j++) + { + if(c->tags[j] && seltags[j]) + { + c->tags[j] = !c->tags[j]; + c->tags[tag-1] = True; + } + } + } + arrange(); +} + unsigned int textnw(const char *text, unsigned int len) { XRectangle r;