---
dwm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dwm.c b/dwm.c
index 4465af1..4481730 100644
--- a/dwm.c
+++ b/dwm.c
@@ -705,7 +705,8 @@ drawbar(Monitor *m)
if (m == selmon) { /* status is only drawn on selected monitor */
drw_setscheme(drw, scheme[SchemeNorm]);
sw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
- drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0);
+ /* status will be color-inverted if starting with a space or non
printable char */
+ drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, (stext[0] <= (char)
33));
}
for (c = m->clients; c; c = c->next) {
--
2.20.1