Re: [dwm] way towards 5.0

From: Madhu <>
Date: Fri, 23 May 2008 11:26:41 +0530

Wrote on Thu, 22 May 2008 20:17:47 +0200:

|> - removed reapply()
| I'm not sure removing reapply() and forcing people to restart dwm is a
| neat idea for those using logon managers. Quitting dwm ends my Xsession,
| kills the X clients and takes me back to xdm.
| Perhaps I'm missing something, if so, please clarify.

The first thing I did on getting dwm was to add a (badly named)

startwm(const char *arg) {
        static char *shell = NULL;

        if(!shell && !(shell = getenv("SHELL")))
                shell = "/bin/sh";
        execlp(shell, shell, "-c", arg, (char *)NULL);
        fprintf(stderr, "dwm: execlp '%s -c %s'", shell, arg);

and then add a keybinding, Mod-q, in config.h keys[] to re-exec the process:

        { MODKEY, XK_q, startwm, "exec dwm < /dev/null" },

I called it `startwm' because I wanted to exec other window managers
too. but it is really just an exec(2) and spawn doesn't cut it here.

PS Perhaps this could be folded into, or perhaps spawn() could be
layered on top of a different function which could also be used for this
Received on Fri May 23 2008 - 07:57:06 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:43:52 UTC