Re: [dwm] I miss regex and what is the "right" way to apply geometry at startup.
On Thu, Mar 13, 2008 at 07:39:02PM -0400, John A. Grahor wrote: > I know Anselm asked if anybody cared whether regex was deleted and I > didn't reply so I guess is should hold my peace now;) But my problem > isn't really with the lack of regex but with the fact that where before > the rules processing would work with a string of the form > "class:instance:title", now it works with each of class, instance and > title independently, searching each one for the rule string. That's a valid remark. But instead of constructing the string again, I consider changing Rule as follows: typdef struct { const char *class; const char *instance; const char *title; const char *tag; Bool isfloating; } Rule; This allows for faster matching. Expect it happen in a rather soon 4.9 release. > On a separate subject, is there a way to apply non-default geometry > settings at start up without editing dwm.c and changing setdefaultgeoms. > What I want to do is reset setgeoms in config.h but I don't know how > to make that happen. Or can setdefaultgeoms be redefined in config.h? > I don't think so. The setgeoms definition will be moved to config.h as proposed some minutes before I did the release ;) Kind regards, -- Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361
[dwm] I miss regex and what is the "right" way to apply geometry at startup.
I just downloaded 4.8 and I'm generally pleased. I like the new H-Tile and geometry handling. I know Anselm asked if anybody cared whether regex was deleted and I didn't reply so I guess is should hold my peace now;) But my problem isn't really with the lack of regex but with the fact that where before the rules processing would work with a string of the form "class:instance:title", now it works with each of class, instance and title independently, searching each one for the rule string. I have certain X clients that only set the title (to something arbitrary and unsearchable) and leave class and instance unset. I want these clients to be floating (when my default layout is tiled). With the old scheme I could put a rule in like "::.*" and it would catch all clients with no class or instance and float them. I can't do that anymore, or at least I haven't figured out a way to do that yet without patching dwm.c At the moment comment in config.h is not correct: Rule rules[] = { /* class:instance:title substr tags refisfloating */ since you can no longer specify a colon separated string. I would suggest building colon separated string before searching the rules like was done before or tokenizing the rule string on colons. On a separate subject, is there a way to apply non-default geometry settings at start up without editing dwm.c and changing setdefaultgeoms. What I want to do is reset setgeoms in config.h but I don't know how to make that happen. Or can setdefaultgeoms be redefined in config.h? I don't think so. Anyway, good on you for another fine release. John