summaryrefslogtreecommitdiffstats
path: root/dwl-patches/patches/hiderule/hiderule.patch
blob: 8ed1a84d66913a6dbab956ab0e9a8fc3d0bf2bbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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