summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config.def.h1
-rw-r--r--dwm.13
-rw-r--r--dwm.c12
3 files changed, 16 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index 169aeec..d76bd0b 100644
--- a/config.def.h
+++ b/config.def.h
@@ -47,6 +47,7 @@ Key keys[] = {
47 { MODKEY, XK_h, setmwfact, "-0.05" }, 47 { MODKEY, XK_h, setmwfact, "-0.05" },
48 { MODKEY, XK_l, setmwfact, "+0.05" }, 48 { MODKEY, XK_l, setmwfact, "+0.05" },
49 { MODKEY, XK_m, togglemax, NULL }, 49 { MODKEY, XK_m, togglemax, NULL },
50 { MODKEY, XK_r, reapply, NULL },
50 { MODKEY, XK_Return, zoom, NULL }, 51 { MODKEY, XK_Return, zoom, NULL },
51 { MODKEY, XK_Tab, viewprevtag, NULL }, 52 { MODKEY, XK_Tab, viewprevtag, NULL },
52 { MODKEY|ShiftMask, XK_space, togglefloating, NULL }, 53 { MODKEY|ShiftMask, XK_space, togglefloating, NULL },
diff --git a/dwm.1 b/dwm.1
index ba6b3f4..aff7bed 100644
--- a/dwm.1
+++ b/dwm.1
@@ -80,6 +80,9 @@ Increases the master area width about 5% (tiled layout only).
80.B Mod1\-m 80.B Mod1\-m
81Toggles maximization of current window. 81Toggles maximization of current window.
82.TP 82.TP
83.B Mod1\-r
84Re-applies tagging rules to all windows.
85.TP
83.B Mod1\-Shift\-[1..n] 86.B Mod1\-Shift\-[1..n]
84Apply 87Apply
85.RB nth 88.RB nth
diff --git a/dwm.c b/dwm.c
index 53e5cb2..0af37d6 100644
--- a/dwm.c
+++ b/dwm.c
@@ -161,6 +161,7 @@ void movemouse(Client *c);
161Client *nexttiled(Client *c); 161Client *nexttiled(Client *c);
162void propertynotify(XEvent *e); 162void propertynotify(XEvent *e);
163void quit(const char *arg); 163void quit(const char *arg);
164void reapply(const char *arg);
164void resize(Client *c, int x, int y, int w, int h, Bool sizehints); 165void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
165void resizemouse(Client *c); 166void resizemouse(Client *c);
166void restack(void); 167void restack(void);
@@ -1159,6 +1160,17 @@ quit(const char *arg) {
1159 readin = running = False; 1160 readin = running = False;
1160} 1161}
1161 1162
1163void
1164reapply(const char *arg) {
1165 static Bool zerotags[LENGTH(tags)] = { 0 };
1166 Client *c;
1167
1168 for(c = clients; c; c = c->next) {
1169 memcpy(c->tags, zerotags, sizeof zerotags);
1170 applyrules(c);
1171 }
1172 arrange();
1173}
1162 1174
1163void 1175void
1164resize(Client *c, int x, int y, int w, int h, Bool sizehints) { 1176resize(Client *c, int x, int y, int w, int h, Bool sizehints) {