[wiki] [sites] [dwm] Patch to move the layout symbol to the left hand side. || Christopher Drelich

From: <git_AT_suckless.org>
Date: Fri, 25 May 2018 02:44:21 +0200

commit 48f16a46456bd4fefaf2e22f9421fc6cc9d6db33
Author: Christopher Drelich <cd_AT_cdrakka.com>
Date: Thu May 24 20:44:04 2018 -0400

    [dwm] Patch to move the layout symbol to the left hand side.

diff --git a/dwm.suckless.org/patches/leftlayout/dwm-leftlayout-20180524-c8e9479.diff b/dwm.suckless.org/patches/leftlayout/dwm-leftlayout-20180524-c8e9479.diff
new file mode 100644
index 00000000..95466b11
--- /dev/null
+++ b/dwm.suckless.org/patches/leftlayout/dwm-leftlayout-20180524-c8e9479.diff
_AT_@ -0,0 +1,69 @@
+From 73f9b8a4563ff89953459feae5bdbda8bdff94e7 Mon Sep 17 00:00:00 2001
+From: Christopher Drelich <cd_AT_cdrakka.com>
+Date: Thu, 24 May 2018 20:40:58 -0400
+Subject: [PATCH] Moved layout symbol to left-hand side.
+
+---
+ dwm.c | 31 +++++++++++++++++--------------
+ 1 file changed, 17 insertions(+), 14 deletions(-)
+
+diff --git a/dwm.c b/dwm.c
+index bb95e26..9a57082 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -431,18 +431,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 - 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_@ -714,6 +717,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_@ -724,9 +730,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 - sw - x) > bh) {
+ if (m->sel) {
+--
+2.7.4
+
diff --git a/dwm.suckless.org/patches/leftlayout/index.md b/dwm.suckless.org/patches/leftlayout/index.md
new file mode 100644
index 00000000..b8720c1b
--- /dev/null
+++ b/dwm.suckless.org/patches/leftlayout/index.md
_AT_@ -0,0 +1,13 @@
+# leftlayout
+
+## Description
+
+Moves the layout symbol in the status bar to the left hand side.
+
+## Download
+
+ * [dwm-leftlayout-20180524-c8e9479.diff](dwm-leftlayout-20180524-c8e9479.diff) (24.05.2018)
+
+## Author
+
+ * cd
Received on Fri May 25 2018 - 02:44:21 CEST

This archive was generated by hypermail 2.3.0 : Fri May 25 2018 - 02:48:23 CEST