sites

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

commit 48f16a46456bd4fefaf2e22f9421fc6cc9d6db33
parent 38e585363d3c2ba9d2e07cc0e0d780f5ff11e33c
Author: Christopher Drelich <cd@cdrakka.com>
Date:   Thu, 24 May 2018 20:44:04 -0400

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

Diffstat:
dwm.suckless.org/patches/leftlayout/dwm-leftlayout-20180524-c8e9479.diff | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dwm.suckless.org/patches/leftlayout/index.md | 13+++++++++++++
2 files changed, 82 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/leftlayout/dwm-leftlayout-20180524-c8e9479.diff b/dwm.suckless.org/patches/leftlayout/dwm-leftlayout-20180524-c8e9479.diff @@ -0,0 +1,69 @@ +From 73f9b8a4563ff89953459feae5bdbda8bdff94e7 Mon Sep 17 00:00:00 2001 +From: Christopher Drelich <cd@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 +@@ -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); +@@ -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]); +@@ -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 @@ -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