summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2022-03-26 13:44:48 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2022-03-26 13:44:48 -0400
commit45624ccf16bdb9fb8072e650c46b3253d32dcfb5 (patch)
treeb7276feb8e0c8e7be85cf35bb8239c725db65bc8
parent5d280ab28b9b4b879fdfaa3ef4485eea95efb7f3 (diff)
Add bar-height patch
-rw-r--r--config.def.h1
-rw-r--r--dwm.c2
-rw-r--r--patch/dwm-bar-height-6.2.diff25
3 files changed, 27 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h
index 9d8da04..8c9e2d5 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 = 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 9b20478..4ede706 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1557,7 +1557,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/patch/dwm-bar-height-6.2.diff b/patch/dwm-bar-height-6.2.diff
new file mode 100644
index 0000000..a576111
--- /dev/null
+++ b/patch/dwm-bar-height-6.2.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 = 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
+@@ -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);