diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2022-12-28 00:27:22 -0500 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2022-12-28 00:27:22 -0500 |
| commit | 3398d028c61165c219bf9361f5b81d3a54e968c8 (patch) | |
| tree | fcf6bbb62c7d0d6bb86a58e0db4eb3d74356c9e1 /dwm.c | |
| parent | f2d52d23f74c065f288d9d4b399404fe50f38fc3 (diff) | |
| download | dwm-3398d028c61165c219bf9361f5b81d3a54e968c8.tar.gz dwm-3398d028c61165c219bf9361f5b81d3a54e968c8.tar.xz | |
Use regular expressions for tagging windows by class and name
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |
