Re: [dwm] dwm-5.4 restart without close clients

From: Neale Pickett <neale_AT_woozle.org>
Date: Tue, 13 Jan 2009 16:11:19 -0600 (CST)

On 1/13/2009, "Frederic Chardon" <chardon.frederic_AT_gmail.com> 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"}
} },
Received on Tue Jan 13 2009 - 22:11:19 UTC

This archive was generated by hypermail 2.2.0 : Tue Jan 13 2009 - 22:24:02 UTC