[wiki] [sites] [dwm][singularbordersbar] add patch || aleks

From: <git_AT_suckless.org>
Date: Wed, 27 Jan 2021 17:14:45 +0100

commit 5d67c332c4a36a5cf87850d0670518b4d0ac28d5
Author: aleks <aleks.stier_AT_icloud.com>
Date: Wed Jan 27 17:13:24 2021 +0100

    [dwm][singularbordersbar] add patch
    
    `singularbordersbar` is a derivative of `singularborders`. The
    difference is that it also removes the top border but preserves the
    border between the clients and the bar.

diff --git a/dwm.suckless.org/patches/singularborders/dwm-singularbordersbar-6.2.diff b/dwm.suckless.org/patches/singularborders/dwm-singularbordersbar-6.2.diff
new file mode 100644
index 00000000..f84f7c31
--- /dev/null
+++ b/dwm.suckless.org/patches/singularborders/dwm-singularbordersbar-6.2.diff
_AT_@ -0,0 +1,75 @@
+From f67d4db0bcef0eb4f601cd25995fd964d60b2a2d Mon Sep 17 00:00:00 2001
+From: aleks <aleks.stier_AT_icloud.com>
+Date: Wed, 27 Jan 2021 16:52:55 +0100
+Subject: [PATCH] [dwm][patch] apply singularbordersbar
+
+`singularbordersbar` changes the way DWM handles the borders. Firstly,
+borders against the left, right, top and bottom screen-edges are removed
+(they are placed off-screen) and secondly, borders between clients now
+overlap eachother. A border between the clients and the bar is also
+created.
+---
+ dwm.c | 24 +++++++++++++++++++-----
+ 1 file changed, 19 insertions(+), 5 deletions(-)
+
+diff --git a/dwm.c b/dwm.c
+index 4465af1..d359d0a 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -205,6 +205,7 @@ static void setup(void);
+ static void seturgent(Client *c, int urg);
+ static void showhide(Client *c);
+ static void sigchld(int unused);
++static int singularborder_baradjustment(Client *c);
+ static void spawn(const Arg *arg);
+ static void tag(const Arg *arg);
+ static void tagmon(const Arg *arg);
+_AT_@ -1112,7 +1113,8 @@ monocle(Monitor *m)
+ if (n > 0) /* override layout symbol */
+ snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
+ for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
+- resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
++ resize(c, m->wx - c->bw, m->wy - singularborder_baradjustment(c),
++ m->ww, m->wh - c->bw * m->showbar, False);
+ }
+
+ void
+_AT_@ -1636,6 +1638,12 @@ sigchld(int unused)
+ while (0 < waitpid(-1, NULL, WNOHANG));
+ }
+
++int
++singularborder_baradjustment(Client *c)
++{
++ return c->bw * !(c->mon->showbar && topbar);
++}
++
+ void
+ spawn(const Arg *arg)
+ {
+_AT_@ -1687,12 +1695,18 @@ tile(Monitor *m)
+ for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
+ if (i < m->nmaster) {
+ h = (m->wh - my) / (MIN(n, m->nmaster) - i);
+- resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
+- my += HEIGHT(c);
++ if (n == 1)
++ resize(c, m->wx - c->bw, m->wy - singularborder_baradjustment(c),
++ m->ww, m->wh - c->bw * m->showbar, False);
++ else
++ resize(c, m->wx - c->bw, m->wy + my - singularborder_baradjustment(c),
++ mw - c->bw, h - c->bw * m->showbar, False);
++ my += HEIGHT(c) - c->bw;
+ } else {
+ h = (m->wh - ty) / (n - i);
+- resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0);
+- ty += HEIGHT(c);
++ resize(c, m->wx + mw - c->bw, m->wy + ty - singularborder_baradjustment(c),
++ m->ww - mw, h - c->bw * m->showbar, False);
++ ty += HEIGHT(c) - c->bw;
+ }
+ }
+
+--
+2.30.0
+
diff --git a/dwm.suckless.org/patches/singularborders/index.md b/dwm.suckless.org/patches/singularborders/index.md
index 3ee860cd..10e401ae 100644
--- a/dwm.suckless.org/patches/singularborders/index.md
+++ b/dwm.suckless.org/patches/singularborders/index.md
_AT_@ -31,6 +31,11 @@ off-screen) and secondly, borders between clients now overlap eachother.
                           |
         + + +
 
+
+`singularbordersbar` is a derivative of `singularborders`. The difference is
+that it also removes the top border but preserves the border between the clients
+and the bar.
+
 Issues
 ------
 * In a multi-monitor setup, you will see monitor one's borders on monitor two
_AT_@ -40,10 +45,11 @@ Issues
 Download
 --------
 * [dwm-singularborders-6.2.diff](dwm-singularborders-6.2.diff)
+* [dwm-singularbordersbar-6.2.diff](dwm-singularbordersbar-6.2.diff)
 * [dwm-6.0-singularborders.diff](dwm-6.0-singularborders.diff)
 * [dwm-6.0-singularborders\_bstack.diff](dwm-6.0-singularborders_bstack.diff)
 
 Author
 ------
 * Jente Hidskes - `<jthidskes at outlook dot com>`
-* Aleksandrs Stier (6.2)
+* Aleksandrs Stier (6.2 port, singularbordersbar-6.2)
Received on Wed Jan 27 2021 - 17:14:45 CET

This archive was generated by hypermail 2.3.0 : Wed Jan 27 2021 - 17:24:50 CET