On 1/13/2009, "Frederic Chardon" <[email protected]> wrote:

>void
>quit(const Arg *arg) {
>    if (arg->i)
>        execlp("dwm", "dwm", NULL);
>    running = False;
>}

Here's the one I use, which can go into config.h instead, and can also
be used to launch other WMs (but why would you want to do that? ;)

void
restart(const Arg *arg)
{
  if (arg->v) {
    execvp(((char **)arg->v)[0], (char **)arg->v);
  } else {
    execlp("dwm", "dwm", NULL);
  }
}


For instance:

  { MODKEY|ShiftMask, XK_r, restart, { 0 } },
  { MODKEY|ShiftMask, XK_b, restart, { .v = (const char *){"blackbox"}
} },



Reply via email to