From e547aa64b970d245449252d9b03f92646c4c827d Mon Sep 17 00:00:00 2001 From: Anant Murmu Date: Sun, 30 Nov 2025 00:30:28 +0530 Subject: [PATCH] Add borderlessrule patch no border around client if client rule isborderless set to 1 --- patches/borderlessrule/README.md | 8 +++ patches/borderlessrule/borderlessrule.patch | 71 +++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 patches/borderlessrule/README.md create mode 100644 patches/borderlessrule/borderlessrule.patch diff --git a/patches/borderlessrule/README.md b/patches/borderlessrule/README.md new file mode 100644 index 0000000..a4f3dd2 --- /dev/null +++ b/patches/borderlessrule/README.md @@ -0,0 +1,8 @@ +### Description +Borderless client if rule set to borderless + +### Download +[main 2025-11-29](/dwl/dwl-patches/raw/branch/main/patches/borderlessrule/borderlessrule.patch) + +### Author +- [freezboltz](https://codeberg.org/freezboltz) diff --git a/patches/borderlessrule/borderlessrule.patch b/patches/borderlessrule/borderlessrule.patch new file mode 100644 index 0000000..70b8de8 --- /dev/null +++ b/patches/borderlessrule/borderlessrule.patch @@ -0,0 +1,71 @@ +From 2a81a809a648046f8361056af06dadf3397fecaa Mon Sep 17 00:00:00 2001 +From: Anant Murmu +Date: Tue, 2 Dec 2025 08:02:16 +0530 +Subject: [PATCH] fix: missing field in struct Rule isborderless + +--- + config.def.h | 7 ++++--- + dwl.c | 7 ++++++- + 2 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 95c2afa..9eee6ca 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -22,10 +22,11 @@ static int log_level = WLR_ERROR; + + /* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */ + static const Rule rules[] = { +- /* app_id title tags mask isfloating monitor */ ++ /* app_id title tags mask isfloating monitor isborderless */ + /* examples: */ +- { "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */ +- { "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */ ++ { "Gimp_EXAMPLE", NULL, 0, 1, -1, 0 }, /* Start on currently visible tags floating, not tiled */ ++ { "firefox_EXAMPLE", NULL, 1 << 8, 0, -1, 0 }, /* Start on ONLY tag "9" */ ++ { "foo_EXAMPLE", NULL, 0, 0, -1, 1 }, /* Start on currently visible tags with no border around it */ + }; + + /* layout(s) */ +diff --git a/dwl.c b/dwl.c +index 12f441e..572f754 100644 +--- a/dwl.c ++++ b/dwl.c +@@ -137,7 +137,7 @@ typedef struct { + #endif + unsigned int bw; + uint32_t tags; +- int isfloating, isurgent, isfullscreen; ++ int isfloating, isurgent, isborderless, isfullscreen; + uint32_t resize; /* configure serial of a pending resize */ + } Client; + +@@ -228,6 +228,7 @@ typedef struct { + uint32_t tags; + int isfloating; + int monitor; ++ int isborderless; + } Rule; + + typedef struct { +@@ -490,6 +491,7 @@ applyrules(Client *c) + if ((!r->title || strstr(title, r->title)) + && (!r->id || strstr(appid, r->id))) { + c->isfloating = r->isfloating; ++ c->isborderless = r->isborderless; + newtags |= r->tags; + i = 0; + wl_list_for_each(m, &mons, link) { +@@ -2210,6 +2212,9 @@ resize(Client *c, struct wlr_box geo, int interact) + if (!c->mon || !client_surface(c)->mapped) + return; + ++ if (c->isborderless) ++ c->bw = 0; ++ + bbox = interact ? &sgeom : &c->mon->w; + + client_set_bounds(c, geo.width, geo.height); +-- +2.52.0 +