mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-12-13 00:13:23 +00:00
Add borderlessrule patch
no border around client if client rule isborderless set to 1
This commit is contained in:
parent
e240c8bf84
commit
b48effb3be
8
patches/borderlessrule/README.md
Normal file
8
patches/borderlessrule/README.md
Normal file
@ -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)
|
||||
64
patches/borderlessrule/borderlessrule.patch
Normal file
64
patches/borderlessrule/borderlessrule.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From cf65713492eda1757a151b335785c72cee87e127 Mon Sep 17 00:00:00 2001
|
||||
From: Anant Murmu <freezboltz@gmail.com>
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user