The DWM process handler that allows restarting dwm without closing all windows.
- compile and add "exec dwmguard" to .xinitrc
- configure a shortcut in dwm that would exit dwm with exit code != 0
The dwm guard will exit if dwm exited with exit code 0 or restart dwm otherwise.
static void exit_code(const Arg *args)
{
exit(args->i);
}
{ MODKEY|ShiftMask, XK_r, exit_code, {.i = 42} },