Modifies quit to handle restarts and adds SIGHUP and SIGTERM handlers.

Modified quit() to restart if it receives arg .i = 1
MOD+CTRL+SHIFT+Q was added to confid.def.h to do just that.

Signal handlers were handled for SIGHUP and SIGTERM.
If dwm receives these signals it calls quit() with
arg .i = to 1 or 0, respectively.

To restart dwm:
MOD+CTRL+SHIFT+Q
or
kill -HUP dwmpid

To quit dwm cleanly:
MOD+SHIFT+Q
or
kill -TERM dwmpid
This commit is contained in:
Christopher Drelich authored and Łukasz Pankowski committed 2026-07-18 23:40:30 +02:00
1 parent 44dbc6809d
commit 22b54433b8
3 files changed
+42

No files matched your search

+1
View File
@@ -96,6 +96,7 @@ static const Key keys[] = {
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} },
};
/* button definitions */