Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
implemented reapply for re-applying the tagging rules during runtime, Mod-r
[dwm.git]
/
dwm.c
diff --git
a/dwm.c
b/dwm.c
index
53e5cb2
..
0af37d6
100644
(file)
--- 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);
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);
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;
}
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) {
void
resize(Client *c, int x, int y, int w, int h, Bool sizehints) {