From ccb34e97be8d154b443dd1ff3504caac90a49210 Mon Sep 17 00:00:00 2001 From: Ray Andrew <4437323+rayandrew@users.noreply.github.com> Date: Mon, 7 Oct 2024 21:50:01 -0500 Subject: [PATCH] add status bar height --- config.def.h | 3 ++- dwm.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.def.h b/config.def.h index 6f580f4..8745d54 100644 --- a/config.def.h +++ b/config.def.h @@ -18,7 +18,8 @@ static const unsigned int gappov = 5; /* vert outer gap between w static int smartgaps = 0; /* 1 means no outer gap when there is only one window */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 0; /* 0 means bottom bar */ -static const int vertpad = 0; /* vertical padding of bar */ +static const int user_bh = 50; /* 0 means that dwm will calculate bar height, >= 1 means dwm will user_bh as bar height */ +static const int vertpad = 8; /* vertical padding of bar */ static const int sidepad = 5; /* horizontal padding of bar */ static const char *fonts[] = { "JetBrainsMonoNL Nerd Font:size=20", diff --git a/dwm.c b/dwm.c index 7773882..f8e73ba 100644 --- a/dwm.c +++ b/dwm.c @@ -2249,7 +2249,7 @@ setup(void) if (!drw_fontset_create(drw, fonts, LENGTH(fonts))) die("no fonts could be loaded."); lrpad = drw->fonts->h; - bh = drw->fonts->h + 2; + bh = user_bh ? user_bh : drw->fonts->h + 2; sp = sidepad; vp = (topbar == 1) ? vertpad : - vertpad; updategeom();