From cc1ec73d4d932fd092d5f796b9abf5752507451b Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Mon, 5 Apr 2021 20:04:03 -0400 Subject: [PATCH] [dwm] Fix various bar bugs Fixed drawing title over last one weirdly and drawing shorter statuses over older ones --- suckless/dwm/dwm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/suckless/dwm/dwm.c b/suckless/dwm/dwm.c index 8d2e56c..2f23940 100644 --- a/suckless/dwm/dwm.c +++ b/suckless/dwm/dwm.c @@ -781,13 +781,9 @@ drawbar(Monitor *m) /* 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 + TEXTW(m->ltsymbol); /* right padding for ltsymbol */ - drw_text(drw, m->ww - tw, 0, tw, bh, 0, stext, 0); + drw_text(drw, m->ww-m->ww/4, 0, m->ww/3, bh, 0, stext, 0); } - else - { - } for (c = m->clients; c; c = c->next) { occ |= c->tags; @@ -814,7 +810,7 @@ drawbar(Monitor *m) if (m->sel) { drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); if(m == selmon) - drw_text(drw, m->ww-w, 0, w-m->ww+w, bh, lrpad / 2, m->sel->name, 0); + drw_text(drw, m->ww/2-m->ww/6, 0, m->ww/3, bh, lrpad / 2, m->sel->name, 0); else drw_text(drw, x, 0, w, bh, lrpad / 2, "", 0); if (m->sel->isfloating)