sites

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

commit 5d67c332c4a36a5cf87850d0670518b4d0ac28d5
parent 07e360f4d5e035c8cef680a9faf043c9243f277a
Author: aleks <aleks.stier@icloud.com>
Date:   Wed, 27 Jan 2021 17:13:24 +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.

Diffstat:
Adwm.suckless.org/patches/singularborders/dwm-singularbordersbar-6.2.diff | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/singularborders/index.md | 8+++++++-
2 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/dwm.suckless.org/patches/singularborders/dwm-singularbordersbar-6.2.diff b/dwm.suckless.org/patches/singularborders/dwm-singularbordersbar-6.2.diff @@ -0,0 +1,75 @@ +From f67d4db0bcef0eb4f601cd25995fd964d60b2a2d Mon Sep 17 00:00:00 2001 +From: aleks <aleks.stier@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 +@@ -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); +@@ -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 +@@ -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) + { +@@ -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 @@ -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 @@ -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)