diff options
| author | Anselm R. Garbe <garbeam@gmail.com> | 2007-12-08 20:11:56 +0100 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@gmail.com> | 2007-12-08 20:11:56 +0100 |
| commit | d66ad1457e6b1e3fc18c01767fdb499acaef3c8e (patch) | |
| tree | 1b8f5d8ccda22f343d402159211b1b900e6f95e8 | |
| parent | next version will be 4.8 (diff) | |
| download | dwm-d66ad1457e6b1e3fc18c01767fdb499acaef3c8e.tar.gz dwm-d66ad1457e6b1e3fc18c01767fdb499acaef3c8e.zip | |
implemented reapply for re-applying the tagging rules during runtime, Mod-r
Diffstat (limited to '')
| -rw-r--r-- | config.def.h | 1 | ||||
| -rw-r--r-- | dwm.1 | 3 | ||||
| -rw-r--r-- | dwm.c | 12 |
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 }, |
| @@ -80,6 +80,9 @@ Increases the master area width about 5% (tiled layout only). | |||
| 80 | .B Mod1\-m | 80 | .B Mod1\-m |
| 81 | Toggles maximization of current window. | 81 | Toggles maximization of current window. |
| 82 | .TP | 82 | .TP |
| 83 | .B Mod1\-r | ||
| 84 | Re-applies tagging rules to all windows. | ||
| 85 | .TP | ||
| 83 | .B Mod1\-Shift\-[1..n] | 86 | .B Mod1\-Shift\-[1..n] |
| 84 | Apply | 87 | Apply |
| 85 | .RB nth | 88 | .RB nth |
| @@ -161,6 +161,7 @@ void movemouse(Client *c); | |||
| 161 | Client *nexttiled(Client *c); | 161 | Client *nexttiled(Client *c); |
| 162 | void propertynotify(XEvent *e); | 162 | void propertynotify(XEvent *e); |
| 163 | void quit(const char *arg); | 163 | void quit(const char *arg); |
| 164 | void reapply(const char *arg); | ||
| 164 | void resize(Client *c, int x, int y, int w, int h, Bool sizehints); | 165 | void resize(Client *c, int x, int y, int w, int h, Bool sizehints); |
| 165 | void resizemouse(Client *c); | 166 | void resizemouse(Client *c); |
| 166 | void restack(void); | 167 | void restack(void); |
| @@ -1159,6 +1160,17 @@ quit(const char *arg) { | |||
| 1159 | readin = running = False; | 1160 | readin = running = False; |
| 1160 | } | 1161 | } |
| 1161 | 1162 | ||
| 1163 | void | ||
| 1164 | reapply(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 | ||
| 1163 | void | 1175 | void |
| 1164 | resize(Client *c, int x, int y, int w, int h, Bool sizehints) { | 1176 | resize(Client *c, int x, int y, int w, int h, Bool sizehints) { |
