Re: [dwm] matching on window title

From: Sander van Dijk <a.h.vandijk_AT_gmail.com>
Date: Wed, 27 Sep 2006 07:54:52 +0200

On 9/27/06, Karl. <kmw1_AT_free.net.nz> wrote:
> I'm using dwm hg tip under Debian Testing, trying to set tags according
> to the title of a new window. I have things like this in my config.h:
>
> { "XTerm:xjed:K.*", "plan", False },
>
> but I can't get anything to match. For debugging, I tried adding an
> fprintf to tags.c, just after the snprintf, like this:
>
> fprintf(stderr, "%s\n", prop);
>
> As far as I can see, prop is the string that the rules are trying to
> match against, but no matter what program I start, the title portion of
> prop is always blank. Amongst other things I tried:
>
> xterm -title test_title
>
> which I presume should be a definitive test.
>
> What might I be missing in order to make this work?

Not your fault: apparently, the client's title isn't set until after
the rulematching, see client.c:manage(). Moving the call to
updatetittle() up to just before the call to settags() should fix
that, but updatetitle() needs to have the tags set first to do its
isvisible() check too; I guess this needs a little restucturing.

Greets, Sander.
Received on Wed Sep 27 2006 - 07:54:53 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:31:33 UTC