From 3398d028c61165c219bf9361f5b81d3a54e968c8 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Wed, 28 Dec 2022 00:27:22 -0500 Subject: Use regular expressions for tagging windows by class and name --- dwm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index ee4137f..67955f6 100644 --- a/dwm.c +++ b/dwm.c @@ -43,7 +43,7 @@ #include "drw.h" #include "util.h" -#include "util2.h" +#include "util2.c" /* macros */ #define BUTTONMASK (ButtonPressMask|ButtonReleaseMask) @@ -298,8 +298,8 @@ applyrules(Client *c) for (i = 0; i < LENGTH(rules); i++) { r = &rules[i]; - if ((!r->title || strstr(c->name, r->title)) - && (!r->class || strstr(class, r->class)) + if ((!r->title || reMatch(r->title, c->name) == 0) + && (!r->class || reMatch(r->class, class) == 0) && (!r->instance || strstr(instance, r->instance))) { c->isfloating = r->isfloating; -- cgit v1.2.3