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..885dd3d --- /dev/null +++ b/patches/borderlessrule/borderlessrule.patch @@ -0,0 +1,64 @@ +From cf65713492eda1757a151b335785c72cee87e127 Mon Sep 17 00:00:00 2001 +From: Anant Murmu +Date: Sat, 29 Nov 2025 20:39:16 +0530 +Subject: [PATCH] borderless client + +- remove borders from client if rule matches the client +--- + config.def.h | 7 ++++--- + dwl.c | 6 +++++- + 2 files changed, 9 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..e97654f 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; + +@@ -490,6 +490,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 +2211,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 +