mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-10-26 17:54:17 +00:00
Add hiderule patch
This commit is contained in:
parent
4745504170
commit
5a2ac3b42d
57
hiderule/hiderule.patch
Normal file
57
hiderule/hiderule.patch
Normal file
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user