Adding tagallmon and tagswapmon patches

This commit is contained in:
bakkeby
2019-09-05 23:59:13 +02:00
parent 1d7247ebb5
commit ab6eb60657
9 changed files with 135 additions and 2 deletions

31
patch/tagallmon.c Normal file
View File

@@ -0,0 +1,31 @@
void
tagallmon(const Arg *arg)
{
Monitor *m;
Client *c;
Client *next;
if (!mons->next)
return;
m = dirtomon(arg->i);
for (c = selmon->clients; c; c = next) {
next = c->next;
if (!ISVISIBLE(c))
continue;
unfocus(c, 1);
detach(c);
detachstack(c);
c->mon = m;
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
attach(c);
attachstack(c);
if (c->isfullscreen) {
setfullscreen(c, 0);
setfullscreen(c, 1);
}
}
focus(NULL);
arrange(NULL);
}