implemented reapply for re-applying the tagging rules during runtime, Mod-r

This commit is contained in:
Anselm R. Garbe
2007-12-08 20:11:56 +01:00
parent 8497f9f781
commit d66ad1457e
3 changed files with 16 additions and 0 deletions

12
dwm.c
View File

@ -161,6 +161,7 @@ void movemouse(Client *c);
Client *nexttiled(Client *c);
void propertynotify(XEvent *e);
void quit(const char *arg);
void reapply(const char *arg);
void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
void resizemouse(Client *c);
void restack(void);
@ -1159,6 +1160,17 @@ quit(const char *arg) {
readin = running = False;
}
void
reapply(const char *arg) {
static Bool zerotags[LENGTH(tags)] = { 0 };
Client *c;
for(c = clients; c; c = c->next) {
memcpy(c->tags, zerotags, sizeof zerotags);
applyrules(c);
}
arrange();
}
void
resize(Client *c, int x, int y, int w, int h, Bool sizehints) {