commit f49458cc750b673c0661ff8659cbcf7422bae2c3
Author: Acid Bong <[email protected]>
Date: Thu May 19 19:19:15 2022 +0300
Modified "bar_height"
Added the version of "bar_height" that adds the variable spacing
to the statusbar's font height instead of setting the overall
statusbar height.
diff --git
a/dwm.suckless.org/patches/bar_height/dwm-bar_height-spacing-6.3.diff
b/dwm.suckless.org/patches/bar_height/dwm-bar_height-spacing-6.3.diff
new file mode 100644
index 00000000..cbdeb9a5
--- /dev/null
+++ b/dwm.suckless.org/patches/bar_height/dwm-bar_height-spacing-6.3.diff
@@ -0,0 +1,25 @@
+diff --git a/config.def.h b/config.def.h
+index 1c0b587..9814500 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -5,6 +5,7 @@ static const unsigned int borderpx = 1; /* border
pixel of windows */
+ static const unsigned int snap = 32; /* snap pixel */
+ static const int showbar = 1; /* 0 means no bar */
+ static const int topbar = 1; /* 0 means bottom bar */
++static const int user_bh = 2; /* 2 is the default spacing
around the bar's font */
+ static const char *fonts[] = { "monospace:size=10" };
+ static const char dmenufont[] = "monospace:size=10";
+ static const char col_gray1[] = "#222222";
+diff --git a/dwm.c b/dwm.c
+index 4465af1..2c27cb3 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -1545,7 +1545,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 = drw->fonts->h + user_bh;
+ updategeom();
+ /* init atoms */
+ utf8string = XInternAtom(dpy, "UTF8_STRING", False);
diff --git a/dwm.suckless.org/patches/bar_height/index.md
b/dwm.suckless.org/patches/bar_height/index.md
index 266644a6..0edbb628 100644
--- a/dwm.suckless.org/patches/bar_height/index.md
+++ b/dwm.suckless.org/patches/bar_height/index.md
@@ -14,6 +14,10 @@ Download
--------
* [dwm-bar-height-6.2.diff](dwm-bar-height-6.2.diff)
+The following patch is following the way mentioned in
[Archwiki](https://wiki.archlinux.org/title/Dwm#Space_around_font_in_dwm's_bar):
the variable (renamed from `user_bh` to `barspacing`) is instead added to the
font size. As a result, the bar height respects the DPI (which defines the font
height).
+* [dwm-bar-height-spacing-6.3.diff](dwm-bar-height-spacing-6.3) (2022-05-19)
+
Authors
-------
-* bit6tream <[email protected]> ([bit6tream's
gitlab](https://gitlab.com/bit9tream))
+* bit6tream <[email protected]> ([bit6tream's
gitlab](https://gitlab.com/bit9tream)): original patch
+* Acid Bong ([github](https://github.com/acid-bong)): `bar-height-spacing`
patch