[wiki] [sites] Added 'removeborder' patch to dwm new file: patches/removeborder/dwm-removeborder-20200520-f09418b.diff new file: patches/removeborder/index.md || Max Amundsen

From: <git_AT_suckless.org>
Date: Mon, 11 May 2020 16:44:38 +0200

commit 2c9a1ed3f7deb970a348cd2c54b64ae3815c5fea
Author: Max Amundsen <massimo_AT_cdrateline.com>
Date: Mon May 11 10:44:53 2020 -0400

    Added 'removeborder' patch to dwm
            new file: patches/removeborder/dwm-removeborder-20200520-f09418b.diff
            new file: patches/removeborder/index.md

diff --git a/dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff b/dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff
new file mode 100644
index 00000000..5414d6b2
--- /dev/null
+++ b/dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff
_AT_@ -0,0 +1,29 @@
+diff --git a/dwm.c b/dwm.c
+index 9fd0286..dcdbc38 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -1277,12 +1277,24 @@ void
+ resizeclient(Client *c, int x, int y, int w, int h)
+ {
+ XWindowChanges wc;
++ unsigned int n;
++ Client *nbc;
+
+ c->oldx = c->x; c->x = wc.x = x;
+ c->oldy = c->y; c->y = wc.y = y;
+ c->oldw = c->w; c->w = wc.width = w;
+ c->oldh = c->h; c->h = wc.height = h;
+ wc.border_width = c->bw;
++
++ for (n = 0, nbc = nexttiled(selmon->clients); nbc; nbc = nexttiled(nbc->next), n++);
++
++ if (c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) {
++ } else {
++ if (selmon->lt[selmon->sellt]->arrange == monocle || n == 1) {
++ wc.border_width = 0;
++ }
++ }
++
+ XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
+ configure(c);
+ XSync(dpy, False);
diff --git a/dwm.suckless.org/patches/removeborder/index.md b/dwm.suckless.org/patches/removeborder/index.md
new file mode 100644
index 00000000..4af52145
--- /dev/null
+++ b/dwm.suckless.org/patches/removeborder/index.md
_AT_@ -0,0 +1,14 @@
+removeborder
+============
+
+Description
+-----------
+Remove the border when there is only one window visible. Simpler reimplimentation of [noborder](../noborder/). Heavily inspired by [uselessgap](../uselessgap/). As this patch basically adds the borderless functionality of uselessgaps, there is no point in using both patches.
+
+Download
+--------
+* [dwm-removeborder-20200520-f09418b.diff](dwm-removeborder-20200520-f09418b.diff)
+
+Author
+-------
+* Max Amundsen - <massimo_AT_cdrateline.com>
Received on Mon May 11 2020 - 16:44:38 CEST

This archive was generated by hypermail 2.3.0 : Mon May 11 2020 - 16:48:46 CEST