implemented reapply for re-applying the tagging rules during runtime, Mod-r
d66ad145
3 file(s) · +16 −0
| 47 | 47 | { MODKEY, XK_h, setmwfact, "-0.05" }, |
|
| 48 | 48 | { MODKEY, XK_l, setmwfact, "+0.05" }, |
|
| 49 | 49 | { MODKEY, XK_m, togglemax, NULL }, |
|
| 50 | + | { MODKEY, XK_r, reapply, NULL }, |
|
| 50 | 51 | { MODKEY, XK_Return, zoom, NULL }, |
|
| 51 | 52 | { MODKEY, XK_Tab, viewprevtag, NULL }, |
|
| 52 | 53 | { MODKEY|ShiftMask, XK_space, togglefloating, NULL }, |
| 80 | 80 | .B Mod1\-m |
|
| 81 | 81 | Toggles maximization of current window. |
|
| 82 | 82 | .TP |
|
| 83 | + | .B Mod1\-r |
|
| 84 | + | Re-applies tagging rules to all windows. |
|
| 85 | + | .TP |
|
| 83 | 86 | .B Mod1\-Shift\-[1..n] |
|
| 84 | 87 | Apply |
|
| 85 | 88 | .RB nth |
| 161 | 161 | Client *nexttiled(Client *c); |
|
| 162 | 162 | void propertynotify(XEvent *e); |
|
| 163 | 163 | void quit(const char *arg); |
|
| 164 | + | void reapply(const char *arg); |
|
| 164 | 165 | void resize(Client *c, int x, int y, int w, int h, Bool sizehints); |
|
| 165 | 166 | void resizemouse(Client *c); |
|
| 166 | 167 | void restack(void); |
|
| 1159 | 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 | 1175 | void |
|
| 1164 | 1176 | resize(Client *c, int x, int y, int w, int h, Bool sizehints) { |
|