Re: [dwm] matching on window title

From: Anselm R. Garbe <arg_AT_10kloc.org>
Date: Wed, 27 Sep 2006 08:18:10 +0200

On Wed, Sep 27, 2006 at 07:54:52AM +0200, Sander van Dijk wrote:
> 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.

Stupid me, you are right.

-- 
 Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361
Received on Wed Sep 27 2006 - 08:18:10 UTC

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