diff -u dwm-4.3/dwm.h dwm-polachok/dwm.h --- dwm-4.3/dwm.h 2007-07-14 23:11:29.000000000 +0400 +++ dwm-polachok/dwm.h 2007-06-06 15:09:03.000000000 +0400 @@ -143,6 +143,7 @@ void tag(const char *arg); /* tags sel with arg's index */ void toggletag(const char *arg); /* toggles sel tags with arg's index */ void toggleview(const char *arg); /* toggles the tag with arg's index (in)visible */ +void focusview(const char *arg); /* focus the first client on toggled view */ void view(const char *arg); /* views the tag with arg's index */ /* util.c */ diff -u dwm-4.3/tag.c dwm-polachok/tag.c --- dwm-4.3/tag.c 2007-07-14 23:11:29.000000000 +0400 +++ dwm-polachok/tag.c 2007-07-15 00:00:19.000000000 +0400 @@ -140,6 +140,21 @@ } void +focusview(const char *arg) { + Client *c; + int i; + toggleview(arg); + i = arg ? atoi(arg) : 0; + if (!seltag[i]) + return; + for(c = clients; c; c = c->next) + if (c->tags[i]) + { + focus(c); + break; + } +} +void view(const char *arg) { int i;