From 593e3c3847a721afd3c7d88767037a7b13132a11 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Tue, 31 Jan 2023 08:29:47 -0500 Subject: On the fly restart --- dwm.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index c2bd871..8bcf0da 100644 --- a/dwm.c +++ b/dwm.c @@ -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) { -- cgit v1.2.3