[wiki] [sites] [dwm][patch][rearrangebar] Add rearrangebar patch || DogeyStamp

From: <git_AT_suckless.org>
Date: Fri, 16 Apr 2021 23:55:02 +0200

commit 93c4c4effd7141decd27cd13c7e447d3debef548
Author: DogeyStamp <adeng.sean_AT_gmail.com>
Date: Fri Apr 16 17:54:28 2021 -0400

    [dwm][patch][rearrangebar] Add rearrangebar patch

diff --git a/dwm.suckless.org/patches/rearrangebar/dwm-rearrangebar-20210415-67d76bd.diff b/dwm.suckless.org/patches/rearrangebar/dwm-rearrangebar-20210415-67d76bd.diff
new file mode 100644
index 00000000..61f3b28b
--- /dev/null
+++ b/dwm.suckless.org/patches/rearrangebar/dwm-rearrangebar-20210415-67d76bd.diff
_AT_@ -0,0 +1,55 @@
+From 891abc2738b6158637acbb6d336162e23dd58f5f Mon Sep 17 00:00:00 2001
+From: DogeyStamp <adeng.sean_AT_gmail.com>
+Date: Thu, 15 Apr 2021 20:11:29 -0400
+Subject: [PATCH] Rearrange bar
+
+Modify bar so tiling method is at the right and window name is in the
+center.
+---
+ dwm.c | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/dwm.c b/dwm.c
+index b0b3466..5fff112 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -701,12 +701,17 @@ drawbar(Monitor *m)
+ int boxw = drw->fonts->h / 6 + 2;
+ unsigned int i, occ = 0, urg = 0;
+ Client *c;
++ w = blw = TEXTW(m->ltsymbol);
++
++ /* clear bar from last draw */
++ drw_setscheme(drw, scheme[SchemeNorm]);
++ drw_rect(drw, 0, 0, m->ww, bh, lrpad / 2, 1);
+
+ /* draw status first so it can be overdrawn by tags later */
+ if (m == selmon) { /* status is only drawn on selected monitor */
+- drw_setscheme(drw, scheme[SchemeNorm]);
+- tw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
++ tw = TEXTW(stext) - lrpad + w; /* right padding for the tiling symbol */
+ drw_text(drw, m->ww - tw, 0, tw, bh, 0, stext, 0);
++ drw_text(drw, m->ww - w, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
+ }
+
+ for (c = m->clients; c; c = c->next) {
+_AT_@ -725,14 +730,13 @@ drawbar(Monitor *m)
+ urg & 1 << i);
+ x += w;
+ }
+- w = blw = TEXTW(m->ltsymbol);
+ drw_setscheme(drw, scheme[SchemeNorm]);
+- x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
++ x = m->ww/3;
+
+ if ((w = m->ww - tw - x) > bh) {
+ if (m->sel) {
+ drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
+- drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
++ drw_text(drw, x, 0, m->ww/3, bh, lrpad / 2, m->sel->name, 0);
+ if (m->sel->isfloating)
+ drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
+ } else {
+--
+2.31.1
+
diff --git a/dwm.suckless.org/patches/rearrangebar/dwm-rearrangebar.png b/dwm.suckless.org/patches/rearrangebar/dwm-rearrangebar.png
new file mode 100644
index 00000000..4a2e18a8
Binary files /dev/null and b/dwm.suckless.org/patches/rearrangebar/dwm-rearrangebar.png differ
diff --git a/dwm.suckless.org/patches/rearrangebar/index.md b/dwm.suckless.org/patches/rearrangebar/index.md
new file mode 100644
index 00000000..366753a4
--- /dev/null
+++ b/dwm.suckless.org/patches/rearrangebar/index.md
_AT_@ -0,0 +1,16 @@
+rearrangebar
+============
+
+[![Screenshot](dwm-rearrangebar.png)](dwm-rearrangebar.png)
+
+Description
+-----------
+Rearrange bar so that the tiling method symbol is at the right of the bar and the window title is in the middle.
+
+Download
+--------
+* [dwm-rearrangebar-20210415-67d76bd.diff](dwm-rearrangebar-20210415-67d76bd.diff)
+
+Authors
+-------
+* DogeyStamp - <adeng.sean[at]gmail.com>
Received on Fri Apr 16 2021 - 23:55:02 CEST

This archive was generated by hypermail 2.3.0 : Sat Apr 17 2021 - 00:01:14 CEST