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 i = arg ? atoi(arg + floating_only) : 0; + int j; + Client* c; + if(i >= 0 && i < ntags) + for(c = clients; c && c->next; c = c->next) + { + if(!floating_only || c->isfloating) + for(j = 0; j < ntags; j += 1) + { + if(c->tags[j] && tags[j]) + { + c->tags[j] = !c->tags[j]; + c->tags[i-1] = True; + } + } + } + arrange(); +} + unsigned int textnw(const char *text, unsigned int len) { XRectangle r;