sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

dwm-nobordermonocle-20260112-798c5db.diff (1165B)


      1 From 798c5dbd6f61eeade4737f9b5e87b1076bc3f414 Mon Sep 17 00:00:00 2001
      2 From: Sebastian Jarsve <sebastianjarsve@gmail.com>
      3 Date: Mon, 12 Jan 2026 17:28:18 +0530
      4 Subject: [PATCH] nobordermonocle: remove borders from nonfloating clients in
      5 
      6 ---
      7  dwm.c | 9 +++++++++
      8  1 file changed, 9 insertions(+)
      9 
     10 diff --git a/dwm.c b/dwm.c
     11 index 8f4fa75..e6c368e 100644
     12 --- a/dwm.c
     13 +++ b/dwm.c
     14 @@ -316,6 +316,10 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact)
     15  	int baseismin;
     16  	Monitor *m = c->mon;
     17  
     18 +	// return 1 if layout is monocle
     19 +	if (&monocle == c->mon->lt[c->mon->sellt]->arrange)
     20 +		return 1;
     21 +
     22  	/* set minimum possible */
     23  	*w = MAX(1, *w);
     24  	*h = MAX(1, *h);
     25 @@ -1292,6 +1296,11 @@ resizeclient(Client *c, int x, int y, int w, int h)
     26  	c->oldw = c->w; c->w = wc.width = w;
     27  	c->oldh = c->h; c->h = wc.height = h;
     28  	wc.border_width = c->bw;
     29 +	if ((&monocle == c->mon->lt[c->mon->sellt]->arrange) && (!c->isfloating)) {
     30 +		wc.border_width = 0;
     31 +		c->w = wc.width += c->bw * 2;
     32 +		c->h = wc.height += c->bw * 2;
     33 +	}
     34  	XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
     35  	configure(c);
     36  	XSync(dpy, False);
     37 -- 
     38 2.51.2
     39