mirror of git://git.suckless.org/dwm
implemented reapply for re-applying the tagging rules during runtime, Mod-r
This commit is contained in:
parent
8497f9f781
commit
d66ad1457e
|
@ -47,6 +47,7 @@ Key keys[] = {
|
||||||
{ MODKEY, XK_h, setmwfact, "-0.05" },
|
{ MODKEY, XK_h, setmwfact, "-0.05" },
|
||||||
{ MODKEY, XK_l, setmwfact, "+0.05" },
|
{ MODKEY, XK_l, setmwfact, "+0.05" },
|
||||||
{ MODKEY, XK_m, togglemax, NULL },
|
{ MODKEY, XK_m, togglemax, NULL },
|
||||||
|
{ MODKEY, XK_r, reapply, NULL },
|
||||||
{ MODKEY, XK_Return, zoom, NULL },
|
{ MODKEY, XK_Return, zoom, NULL },
|
||||||
{ MODKEY, XK_Tab, viewprevtag, NULL },
|
{ MODKEY, XK_Tab, viewprevtag, NULL },
|
||||||
{ MODKEY|ShiftMask, XK_space, togglefloating, NULL },
|
{ MODKEY|ShiftMask, XK_space, togglefloating, NULL },
|
||||||
|
|
3
dwm.1
3
dwm.1
|
@ -80,6 +80,9 @@ Increases the master area width about 5% (tiled layout only).
|
||||||
.B Mod1\-m
|
.B Mod1\-m
|
||||||
Toggles maximization of current window.
|
Toggles maximization of current window.
|
||||||
.TP
|
.TP
|
||||||
|
.B Mod1\-r
|
||||||
|
Re-applies tagging rules to all windows.
|
||||||
|
.TP
|
||||||
.B Mod1\-Shift\-[1..n]
|
.B Mod1\-Shift\-[1..n]
|
||||||
Apply
|
Apply
|
||||||
.RB nth
|
.RB nth
|
||||||
|
|
12
dwm.c
12
dwm.c
|
@ -161,6 +161,7 @@ void movemouse(Client *c);
|
||||||
Client *nexttiled(Client *c);
|
Client *nexttiled(Client *c);
|
||||||
void propertynotify(XEvent *e);
|
void propertynotify(XEvent *e);
|
||||||
void quit(const char *arg);
|
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 resize(Client *c, int x, int y, int w, int h, Bool sizehints);
|
||||||
void resizemouse(Client *c);
|
void resizemouse(Client *c);
|
||||||
void restack(void);
|
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
|
void
|
||||||
resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
|
resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
|
||||||
|
|
Loading…
Reference in New Issue