aboutsummaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-11-15 16:11:33 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-11-15 16:11:33 +0100
commit419638a2730fbf1e2dc33b1119f8d1f30f112902 (patch)
tree38a16e5de29c0816bc60479b9801bd0a7ce72783 /dwm.c
parentKeys update (diff)
downloaddwm-419638a2730fbf1e2dc33b1119f8d1f30f112902.tar.gz
dwm-419638a2730fbf1e2dc33b1119f8d1f30f112902.tar.bz2
dwm-419638a2730fbf1e2dc33b1119f8d1f30f112902.tar.xz
dwm-419638a2730fbf1e2dc33b1119f8d1f30f112902.tar.zst
dwm-419638a2730fbf1e2dc33b1119f8d1f30f112902.zip
Added switchtotag patch
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index a875204..f11433d 100644
--- a/dwm.c
+++ b/dwm.c
@@ -93,6 +93,7 @@ struct Client {
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int bw, oldbw;
unsigned int tags;
+ unsigned int switchtotag;
int isfixed, isfloating, isfreesize, isurgent, neverfocus, oldstate, isfullscreen;
Client *next;
Client *snext;
@@ -140,6 +141,7 @@ typedef struct {
const char *instance;
const char *title;
unsigned int tags;
+ unsigned int switchtotag;
int isfloating;
int isfreesize;
int monitor;
@@ -353,6 +355,11 @@ applyrules(Client *c)
for (m = mons; m && m->num != r->monitor; m = m->next);
if (m)
c->mon = m;
+ if (r->switchtotag) {
+ Arg a = { .ui = r->tags };
+ c->switchtotag = selmon->tagset[selmon->seltags];
+ view(&a);
+ }
}
}
if (ch.res_class)
@@ -2103,6 +2110,10 @@ unmanage(Client *c, int destroyed)
focus(NULL);
updateclientlist();
arrange(m);
+ if (c->switchtotag) {
+ Arg a = { .ui = c->switchtotag };
+ view(&a);
+ }
}
void