From 5a2ac3b42de1697029a9d9381d23a0c30f4a36b3 Mon Sep 17 00:00:00 2001 From: Micah N Gorrell Date: Wed, 27 Mar 2024 12:55:06 -0600 Subject: [PATCH] Add hiderule patch --- hiderule/hiderule.patch | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 hiderule/hiderule.patch diff --git a/hiderule/hiderule.patch b/hiderule/hiderule.patch new file mode 100644 index 0000000..8ed1a84 --- /dev/null +++ b/hiderule/hiderule.patch @@ -0,0 +1,57 @@ +From fb48ec754d63b3d8e40fff2d047050675887d7f4 Mon Sep 17 00:00:00 2001 +From: Micah N Gorrell +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 +