From d66ad1457e6b1e3fc18c01767fdb499acaef3c8e Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Sat, 8 Dec 2007 20:11:56 +0100 Subject: implemented reapply for re-applying the tagging rules during runtime, Mod-r --- dwm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index 53e5cb20..0af37d68 100644 --- a/dwm.c +++ b/dwm.c @@ -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) { -- cgit v1.2.3