dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 686a8bccb351da691d71d447119e6e945046f89c
parent b1115d7f88d10abf8cf18db33d55b904391adf64
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date:   Sun, 15 Dec 2019 22:45:47 +0100

Remove window title in status bar

Credit to: https://github.com/theKnary/dots

Diffstat:
Msuckless/dwm/config.h | 1+
Msuckless/dwm/dwm.c | 4+++-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/suckless/dwm/config.h b/suckless/dwm/config.h @@ -6,6 +6,7 @@ /* appearance */ static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ +static const int showtitle = 0; /* 0 means no title */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const char *fonts[] = { "Sans:size=9" }; diff --git a/suckless/dwm/dwm.c b/suckless/dwm/dwm.c @@ -725,6 +725,7 @@ drawbar(Monitor *m) int boxs = drw->fonts->h / 9; int boxw = drw->fonts->h / 6 + 2; unsigned int i, occ = 0, urg = 0; + char *st; Client *c; /* draw status first so it can be overdrawn by tags later */ @@ -757,7 +758,8 @@ drawbar(Monitor *m) if ((w = m->ww - sw - x) > bh) { if (m->sel) { drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); - drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0); + st = showtitle ? m->sel->name : " "; + drw_text(drw, x, 0, w, bh, lrpad / 2, st, 0); if (m->sel->isfloating) drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0); } else {