|
|
- 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
-
|