[wiki] [sites] bar_height: this patch allows user to set custom height for bar || bit9tream

From: <git_AT_suckless.org>
Date: Thu, 14 May 2020 16:10:11 +0200

commit bcc66c27e76903a5cbc276d8092599d54c6d8182
Author: bit9tream <bit6tream_AT_cock.li>
Date: Thu May 14 17:07:28 2020 +0300

    bar_height: this patch allows user to set custom height for bar

diff --git a/dwm.suckless.org/patches/bar_height/dwm-bar-height-6.2.diff b/dwm.suckless.org/patches/bar_height/dwm-bar-height-6.2.diff
new file mode 100644
index 00000000..a576111a
--- /dev/null
+++ b/dwm.suckless.org/patches/bar_height/dwm-bar-height-6.2.diff
_AT_@ -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
+_AT_@ -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 = 0; /* 0 means that dwm will calculate bar height, >= 1 means dwm will user_bh as bar height */
+ 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
+_AT_@ -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 = user_bh ? user_bh : drw->fonts->h + 2;
+ 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
new file mode 100644
index 00000000..266644a6
--- /dev/null
+++ b/dwm.suckless.org/patches/bar_height/index.md
_AT_@ -0,0 +1,19 @@
+bar height
+==========
+
+This patch allows user to change dwm's default bar height.
+
+Usage
+-----
+
+Change `user_bh` variable in you're config.h If `user_bh` is equal to 0 dwm will calculate bar height like it did before.
+
+ static const int user_bh = 0; /* 0 means that dwm will calculate bar height, >= 1 means dwm will user_bh as bar height */
+
+Download
+--------
+* [dwm-bar-height-6.2.diff](dwm-bar-height-6.2.diff)
+
+Authors
+-------
+* bit6tream <bit6tream_AT_cock.li> ([bit6tream's gitlab](https://gitlab.com/bit9tream))
Received on Thu May 14 2020 - 16:10:11 CEST

This archive was generated by hypermail 2.3.0 : Thu May 14 2020 - 16:12:50 CEST