Adding tagallmon and tagswapmon patches
This commit is contained in:
@@ -10,6 +10,14 @@
|
||||
#include "systray.c"
|
||||
#endif
|
||||
|
||||
#if TAGALLMON_PATCH
|
||||
#include "tagallmon.c"
|
||||
#endif
|
||||
|
||||
#if TAGSWAPMON_PATCH
|
||||
#include "tagswapmon.c"
|
||||
#endif
|
||||
|
||||
#if TOGGLEFULLSCREEN_PATCH
|
||||
#include "togglefullscreen.c"
|
||||
#endif
|
||||
|
@@ -6,6 +6,14 @@
|
||||
#include "systray.h"
|
||||
#endif
|
||||
|
||||
#if TAGALLMON_PATCH
|
||||
#include "tagallmon.h"
|
||||
#endif
|
||||
|
||||
#if TAGSWAPMON_PATCH
|
||||
#include "tagswapmon.h"
|
||||
#endif
|
||||
|
||||
#if TOGGLEFULLSCREEN_PATCH
|
||||
#include "togglefullscreen.h"
|
||||
#endif
|
||||
|
31
patch/tagallmon.c
Normal file
31
patch/tagallmon.c
Normal 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);
|
||||
}
|
1
patch/tagallmon.h
Normal file
1
patch/tagallmon.h
Normal file
@@ -0,0 +1 @@
|
||||
static void tagallmon(const Arg *arg);
|
60
patch/tagswapmon.c
Normal file
60
patch/tagswapmon.c
Normal file
@@ -0,0 +1,60 @@
|
||||
void
|
||||
tagswapmon(const Arg *arg)
|
||||
{
|
||||
Monitor *m;
|
||||
Client *c, *sc = NULL, *mc = NULL, *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->next = sc;
|
||||
sc = c;
|
||||
}
|
||||
|
||||
for (c = m->clients; c; c = next) {
|
||||
next = c->next;
|
||||
if (!ISVISIBLE(c))
|
||||
continue;
|
||||
unfocus(c, 1);
|
||||
detach(c);
|
||||
detachstack(c);
|
||||
c->next = mc;
|
||||
mc = c;
|
||||
}
|
||||
|
||||
for (c = sc; c; c = next) {
|
||||
next = c->next;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
for (c = mc; c; c = next) {
|
||||
next = c->next;
|
||||
c->mon = selmon;
|
||||
c->tags = selmon->tagset[selmon->seltags]; /* assign tags of target monitor */
|
||||
attach(c);
|
||||
attachstack(c);
|
||||
if (c->isfullscreen) {
|
||||
setfullscreen(c, 0);
|
||||
setfullscreen(c, 1);
|
||||
}
|
||||
}
|
||||
|
||||
focus(NULL);
|
||||
arrange(NULL);
|
||||
}
|
1
patch/tagswapmon.h
Normal file
1
patch/tagswapmon.h
Normal file
@@ -0,0 +1 @@
|
||||
static void tagswapmon(const Arg *arg);
|
Reference in New Issue
Block a user