From 13df37246f052b7f67c4e03a2a699630c33529b7 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sun, 17 Dec 2023 09:51:58 +0100 Subject: Add option to hide window title from status bar --- configs/framework.h | 1 + dwm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/framework.h b/configs/framework.h index 2a7af14..ad8a4b0 100644 --- a/configs/framework.h +++ b/configs/framework.h @@ -17,6 +17,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int snap = 8; /* snap pixel */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 0; /* 0 means bottom bar */ +static const int showtitle = 0; /* True means titles are shown on status bar */ static const char *fonts[] = { "DVIcons:size=8" }; static const char dmenufont[] = "DVIcons:size=8"; diff --git a/dwm.c b/dwm.c index bc7d1ad..a75c464 100644 --- a/dwm.c +++ b/dwm.c @@ -834,7 +834,7 @@ drawbar(Monitor *m) x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0); if ((w = m->ww - tw - x) > bh) { - if (m->sel) { + if (m->sel && showtitle) { drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0); if (m->sel->isfloating) -- cgit v1.2.3