Re: [dwm] xprop patch

From: Neale Pickett <>
Date: Tue, 09 Dec 2008 14:44:10 -0700

Benoit, I'm still confused about what you want. I have a "restart"
function in my config.h that also lets me start a different WM
(currently unused):

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

There's really no reason to keep the always-empty argv around in your
patch: dwm's only argument is "-v", in which case it prints the version
and exits.

Benoit T <> writes:

> Speaking of a separate process, people should probably check the
> status from xsetroot and exit when the X connection closes, to make it
> more robust in case they detach the status script from the parent X
> process.

Oh right, I forgot that when I typed in my email

So you'll want to use something like:

    xsetroot -name "$(date)" || exit 0

    status | while read line; do xsetroot -name "$line" || break; done

However, if you restart X before it has a chance to write, you will have
*two* status processes running. Dealing with this is left as an
exercise to the hacker.

Received on Tue Dec 09 2008 - 21:44:10 UTC

This archive was generated by hypermail 2.2.0 : Tue Dec 09 2008 - 21:48:04 UTC