aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddy Pedroni <epedroni@pm.me>2023-12-17 09:51:58 +0100
committerEddy Pedroni <epedroni@pm.me>2023-12-17 09:51:58 +0100
commit13df37246f052b7f67c4e03a2a699630c33529b7 (patch)
tree0f2430508e8542420475be528bbe26f855ac03e9
parentad9a48f3612b2bf397234af9b4c45f8f5def6d17 (diff)
Add option to hide window title from status bar
-rw-r--r--configs/framework.h1
-rw-r--r--dwm.c2
2 files changed, 2 insertions, 1 deletions
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)