dwm

[fork] dynamic window manager
Log | Files | Refs | README | LICENSE

commit 282e6dead34fbe89a939a19b6bb78b58f9442fd6
parent 2c16d1d77ebd00f3da6f8c8193a32ae6c1ce1008
Author: hhvn <hayden@haydenvh.com>
Date:   Sun, 22 Nov 2020 22:40:49 +0000

dwm.c config.h: limit width of title sections in bar

Diffstat:
Mconfig.h | 3++-
Mdwm.c | 2++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/config.h b/config.h @@ -3,7 +3,8 @@ /* appearance */ static const unsigned int borderpx = 2; /* border pixel of windows */ static const unsigned int gappx = 10; -static const unsigned int snap = 1; /* snap pixel */ +static const unsigned int titlepx = 180; /* max pixel size of each title, 0 for no max */ +static const unsigned int snap = 1; /* snap pixel */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const char *fonts[] = { "monospace:size=8" }; diff --git a/dwm.c b/dwm.c @@ -824,6 +824,8 @@ drawbar(Monitor *m) if (n > 0) { int remainder = w % n; int tabw = (1.0 / (double)n) * w + 1; + if (tabw > titlepx && titlepx != 0) + tabw = titlepx; for (c = m->clients; c; c = c->next) { if (!ISVISIBLE(c)) continue;