On Fri, Jan 13, 2012 at 21:57:31 +0000, Rob wrote: > Check /(toggle)?(view|tag)/ functions in dwm.c > Or you could change arrange() so it sets the tagset for all other monitors too
I looked into this, and the attached patch seems to result in exactly what I asked for -- synchronized tags across monitors. Thanks for your help!
# HG changeset patch # Parent 64831f9265e00631a32effa1ce03efb69b2521d5 diff -r 64831f9265e0 dwm.c --- a/dwm.c Mon Nov 14 14:35:42 2011 -0500 +++ b/dwm.c Mon Jan 16 11:17:47 2012 +0100 @@ -1467,7 +1467,6 @@ detach(c); detachstack(c); c->mon = m; - c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ attach(c); attachstack(c); focus(NULL); @@ -1751,12 +1750,16 @@ void toggleview(const Arg *arg) { + Monitor *m; + unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK); if(newtagset) { - selmon->tagset[selmon->seltags] = newtagset; + for(m = mons; m; m = m->next) + m->tagset[m->seltags] = newtagset; focus(NULL); - arrange(selmon); + for(m = mons; m; m = m->next) + arrange(m); } } @@ -2032,13 +2035,17 @@ void view(const Arg *arg) { + Monitor *m; + if((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]) return; selmon->seltags ^= 1; /* toggle sel tagset */ if(arg->ui & TAGMASK) - selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; + for(m = mons; m; m = m->next) + m->tagset[m->seltags] = arg->ui & TAGMASK; focus(NULL); - arrange(selmon); + for(m = mons; m; m = m->next) + arrange(m); } Client *