From d2f3ac840845802eaf9ff7daf406f04722fd02aa Mon Sep 17 00:00:00 2001 From: Oak Date: Sun, 25 Aug 2024 17:43:17 +0200 Subject: [PATCH] Implement barheight patch --- config.def.h | 1 + dwl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index 5d1dc2b..f11089c 100644 --- a/config.def.h +++ b/config.def.h @@ -7,6 +7,7 @@ static const int sloppyfocus = 1; /* focus follows mouse */ static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */ static const unsigned int borderpx = 1; /* border pixel of windows */ +static const int user_bh = 30; /* 0 means that dwl will calculate barheight, >= 1 means dwl will use user_bh as the bar height. */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const char *fonts[] = {"monospace:size=10"}; diff --git a/dwl.c b/dwl.c index ece537a..2863202 100644 --- a/dwl.c +++ b/dwl.c @@ -3183,7 +3183,7 @@ updatebar(Monitor *m) m->b.scale = m->wlr_output->scale; m->lrpad = m->drw->font->height; - m->b.height = m->drw->font->height + 2; + m->b.height = user_bh ? user_bh : m->drw->font->height + 2; m->b.real_height = (int)((float)m->b.height / m->wlr_output->scale); } -- 2.46.0