diff options
Diffstat (limited to 'dwl-patches/patches/hiderule/hiderule.patch')
-rw-r--r-- | dwl-patches/patches/hiderule/hiderule.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/dwl-patches/patches/hiderule/hiderule.patch b/dwl-patches/patches/hiderule/hiderule.patch new file mode 100644 index 0000000..8ed1a84 --- /dev/null +++ b/dwl-patches/patches/hiderule/hiderule.patch @@ -0,0 +1,57 @@ +From fb48ec754d63b3d8e40fff2d047050675887d7f4 Mon Sep 17 00:00:00 2001 +From: Micah N Gorrell <m@minego.net> +Date: Wed, 27 Mar 2024 12:53:18 -0600 +Subject: [PATCH] hiderule + +--- + config.def.h | 9 ++++++--- + dwl.c | 4 ++++ + 2 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 9009517..c476057 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -21,11 +21,14 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca + static int log_level = WLR_ERROR; + + static const Rule rules[] = { +- /* app_id title tags mask isfloating monitor */ ++ /* app_id title tags mask isfloating monitor ishidden */ + /* examples: +- { "Gimp", NULL, 0, 1, -1 }, ++ { "Gimp", NULL, 0, 1, -1, 0 }, + */ +- { "firefox", NULL, 1 << 8, 0, -1 }, ++ { "firefox", NULL, 1 << 8, 0, -1, 0 }, ++ ++ { "firefox", "Sharing Indicator", ++ 0, 1, -1, 1 }, + }; + + /* layout(s) */ +diff --git a/dwl.c b/dwl.c +index 5867b0c..799fd89 100644 +--- a/dwl.c ++++ b/dwl.c +@@ -228,6 +228,7 @@ typedef struct { + uint32_t tags; + int isfloating; + int monitor; ++ int ishidden; + } Rule; + + typedef struct { +@@ -464,6 +465,9 @@ applyrules(Client *c) + c->isfloating = r->isfloating; + newtags |= r->tags; + i = 0; ++ if (r->ishidden) { ++ mon = NULL; ++ } + wl_list_for_each(m, &mons, link) { + if (r->monitor == i++) + mon = m; +-- +2.44.0 + |