diff options
| -rw-r--r-- | config.def.h | 1 | ||||
| -rw-r--r-- | dwm.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h index 9efa774..aed3eb3 100644 --- a/config.def.h +++ b/config.def.h @@ -94,6 +94,7 @@ static const Key keys[] = { TAGKEYS( XK_7, 6) TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) + { MODKEY|ShiftMask, XK_r, restart, {0} }, { MODKEY|ShiftMask, XK_q, quit, {0} }, }; @@ -142,6 +142,7 @@ typedef struct { } Rule; /* function declarations */ +static void restart(Arg *arg); static void applyrules(Client *c); static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact); static void arrange(Monitor *m); @@ -275,6 +276,14 @@ static Window root, wmcheckwin; struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; }; /* function implementations */ + +void +restart(const Arg *arg) +{ + char *a[] = {"dwm", NULL}; + execvp(a[0], a); +} + void applyrules(Client *c) { |
