Re: [dev] [dwm] adding WM_WINDOW_ROLE rule

From: Rob <robpilling_AT_gmail.com>
Date: Tue, 27 Jul 2010 01:50:45 +0100

On 27 July 2010 01:35, Kris Maglione <maglione.k_AT_gmail.com> wrote:
...
> Not so much. There's quite easy if you allow C99, anyway.
>
> typedef struct {
>        char *class;
>        char *regex;
>        int ord;
> } Prop;
>
> struct {
>        char *Rule;
>        RuleFn fn;
>        RuleArg arg;
> } rules[] = {
>        { (Rule[]){ {"WM_CLASS", "foo", 1}, {"WM_NAME", "bar"}, {0}},
>          retag, { .s = "baz" } },
> };
>
> Or something to that effect. Although a macro to wrap up the simple cases
> would probably help.

Oh yeah, forgot about C99 :D.
Received on Tue Jul 27 2010 - 02:50:45 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 27 2010 - 03:00:04 CEST