[wiki] [sites] [dwm][patch][leftlayout] Update for dwm 138b405 || Jack Bird

From: <git_AT_suckless.org>
Date: Wed, 21 Jul 2021 18:06:50 +0200

commit 6bbb689a2ef3dee139dedbb69c32b52cff6c72d5
Author: Jack Bird <jack.bird_AT_durham.ac.uk>
Date: Wed Jul 21 17:06:44 2021 +0100

    [dwm][patch][leftlayout] Update for dwm 138b405

diff --git a/dwm.suckless.org/patches/leftlayout/dwm-leftlayout-20210721-138b405.diff b/dwm.suckless.org/patches/leftlayout/dwm-leftlayout-20210721-138b405.diff
new file mode 100644
index 00000000..600a801f
--- /dev/null
+++ b/dwm.suckless.org/patches/leftlayout/dwm-leftlayout-20210721-138b405.diff
_AT_@ -0,0 +1,69 @@
+From 9ec1210a82b137014de4644ba65be5e53398e281 Mon Sep 17 00:00:00 2001
+From: Jack Bird <jack.bird_AT_durham.ac.uk>
+Date: Wed, 21 Jul 2021 16:43:06 +0100
+Subject: [PATCH] Updated leftlayout for 138b405
+
+---
+ dwm.c | 31 +++++++++++++++++--------------
+ 1 file changed, 17 insertions(+), 14 deletions(-)
+
+diff --git a/dwm.c b/dwm.c
+index 5e4d494..a5a3980 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -432,18 +432,21 @@ buttonpress(XEvent *e)
+ }
+ if (ev->window == selmon->barwin) {
+ i = x = 0;
+- do
+- x += TEXTW(tags[i]);
+- while (ev->x >= x && ++i < LENGTH(tags));
+- if (i < LENGTH(tags)) {
+- click = ClkTagBar;
+- arg.ui = 1 << i;
+- } else if (ev->x < x + blw)
++ x += blw;
++ if (ev->x < x) {
+ click = ClkLtSymbol;
+- else if (ev->x > selmon->ww - (int)TEXTW(stext))
+- click = ClkStatusText;
+- else
+- click = ClkWinTitle;
++ } else {
++ do
++ x += TEXTW(tags[i]);
++ while (ev->x >= x && ++i < LENGTH(tags));
++ if (i < LENGTH(tags)) {
++ click = ClkTagBar;
++ arg.ui = 1 << i;
++ } else if (ev->x > selmon->ww - TEXTW(stext))
++ click = ClkStatusText;
++ else
++ click = ClkWinTitle;
++ }
+ } else if ((c = wintoclient(ev->window))) {
+ focus(c);
+ restack(selmon);
+_AT_@ -715,6 +718,9 @@ drawbar(Monitor *m)
+ urg |= c->tags;
+ }
+ x = 0;
++ w = blw = TEXTW(m->ltsymbol);
++ drw_setscheme(drw, scheme[SchemeNorm]);
++ x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
+ for (i = 0; i < LENGTH(tags); i++) {
+ w = TEXTW(tags[i]);
+ drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
+_AT_@ -725,9 +731,6 @@ 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);
+
+ if ((w = m->ww - tw - x) > bh) {
+ if (m->sel) {
+--
+2.32.0
+
diff --git a/dwm.suckless.org/patches/leftlayout/index.md b/dwm.suckless.org/patches/leftlayout/index.md
index edcc4526..4411485f 100644
--- a/dwm.suckless.org/patches/leftlayout/index.md
+++ b/dwm.suckless.org/patches/leftlayout/index.md
_AT_@ -7,8 +7,10 @@ Moves the layout symbol in the status bar to the left hand side.
 
 Download
 --------
+* [dwm-leftlayout-20210721-138b405.diff](dwm-leftlayout-20210721-138b405.diff) (2021-07-21)
 * [dwm-leftlayout-20180524-c8e9479.diff](dwm-leftlayout-20180524-c8e9479.diff) (2018-05-24)
 
 Author
 ------
 * cd
+* Jack Bird - <jack.bird_AT_dur.ac.uk> (138b405 port)
Received on Wed Jul 21 2021 - 18:06:50 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 21 2021 - 18:12:44 CEST