Re: [hackers] [dwm] rm rules || Daniel Cousens

From: Anselm Garbe <garbeam_AT_gmail.com>
Date: Wed, 11 Oct 2017 10:26:41 +0200

Please ignore, already dropped.

On 11 October 2017 at 09:19, <git_AT_suckless.org> wrote:
> commit 2342f3b01a4321478948371f247f622698e8f576
> Author: Daniel Cousens <github_AT_dcousens.com>
> AuthorDate: Sun Apr 23 19:05:33 2017 +1000
> Commit: Daniel Cousens <github_AT_dcousens.com>
> CommitDate: Wed Oct 11 07:55:14 2017 +1100
>
> rm rules
>
> diff --git a/config.def.h b/config.def.h
> index 3a32b11..8b5ee26 100644
> --- a/config.def.h
> +++ b/config.def.h
> _AT_@ -26,15 +26,6 @@ static const char *colors[][3] = {
> /* tagging */
> static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=" };
>
> -static const Rule rules[] = {
> - /* xprop(1):
> - * WM_CLASS(STRING) = instance, class
> - * WM_NAME(STRING) = title
> - */
> - /* class instance title tags mask isfloating monitor */
> - { "Gimp", NULL, NULL, 0, 1, -1 }
> -};
> -
> /* layout(s) */
> static const Layout layouts[] = {
> /* symbol arrange function */
> diff --git a/dwm.c b/dwm.c
> index 4aeec4e..d9858cd 100644
> --- a/dwm.c
> +++ b/dwm.c
> _AT_@ -133,15 +133,6 @@ struct Monitor {
> const Layout *lt[2];
> };
>
> -typedef struct {
> - const char *class;
> - const char *instance;
> - const char *title;
> - unsigned int tags;
> - int isfloating;
> - int monitor;
> -} Rule;
> -
> /* function declarations */
> static void applyrules(Client *c);
> static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact);
> _AT_@ -282,7 +273,6 @@ applyrules(Client *c)
> {
> const char *class, *instance;
> unsigned int i;
> - const Rule *r;
> Monitor *m;
> XClassHint ch = { NULL, NULL };
>
> _AT_@ -293,19 +283,6 @@ applyrules(Client *c)
> class = ch.res_class ? ch.res_class : broken;
> instance = ch.res_name ? ch.res_name : broken;
>
> - for (i = 0; i < LENGTH(rules); i++) {
> - r = &rules[i];
> - if ((!r->title || strstr(c->name, r->title))
> - && (!r->class || strstr(class, r->class))
> - && (!r->instance || strstr(instance, r->instance)))
> - {
> - c->isfloating = r->isfloating;
> - c->tags |= r->tags;
> - for (m = mons; m && m->num != r->monitor; m = m->next);
> - if (m)
> - c->mon = m;
> - }
> - }
> if (ch.res_class)
> XFree(ch.res_class);
> if (ch.res_name)
>
Received on Wed Oct 11 2017 - 10:26:41 CEST

This archive was generated by hypermail 2.3.0 : Wed Oct 11 2017 - 10:37:10 CEST