diff -r c19e2f20ca69 config.def.h --- a/config.def.h Thu Oct 29 15:39:12 2009 +0100 +++ b/config.def.h Thu Oct 29 15:43:42 2009 +0100 @@ -80,7 +80,8 @@ TAGKEYS( XK_7, 6) TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) - { MODKEY|ShiftMask, XK_q, quit, {0} }, + { MODKEY|ShiftMask|ControlMask, XK_q, quit, {.i = 0 } }, + { MODKEY|ShiftMask, XK_q, quit, {.i = 1 } }, }; /* button definitions */ diff -r c19e2f20ca69 dwm.c --- a/dwm.c Thu Oct 29 15:39:12 2009 +0100 +++ b/dwm.c Thu Oct 29 15:43:42 2009 +0100 @@ -270,6 +270,7 @@ static Monitor *mons = NULL, *selmon = NULL; static Window root; +static char **args; /* configuration, allows nested code to access above variables */ #include "config.h" @@ -1292,6 +1293,8 @@ void quit(const Arg *arg) { + if(arg->i) /* restart dwm, if fails just fall through and exit */ + execv(args[0], args); running = False; } @@ -2008,6 +2011,7 @@ fputs("warning: no locale support\n", stderr); if(!(dpy = XOpenDisplay(NULL))) die("dwm: cannot open display\n"); + args = argv; checkotherwm(); setup(); scan();