summaryrefslogtreecommitdiffstats
path: root/dwl-patches/patches/barheight
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2025-05-23 11:41:09 +0000
committerLeonard Kugis <leonard@kug.is>2025-05-23 11:41:09 +0000
commitc70505d7c7b7b48600f273357694b56ccf5d2a15 (patch)
tree21c27ac6ffced8d6d904e35bdb39baa5d685d829 /dwl-patches/patches/barheight
downloaddotfiles-master.tar.gz
dotfiles-master.tar.bz2
dotfiles-master.zip
Initial commitHEADmaster
Diffstat (limited to 'dwl-patches/patches/barheight')
-rw-r--r--dwl-patches/patches/barheight/README.md11
-rw-r--r--dwl-patches/patches/barheight/barheight.patch38
2 files changed, 49 insertions, 0 deletions
diff --git a/dwl-patches/patches/barheight/README.md b/dwl-patches/patches/barheight/README.md
new file mode 100644
index 0000000..4dad736
--- /dev/null
+++ b/dwl-patches/patches/barheight/README.md
@@ -0,0 +1,11 @@
+### Description
+
+Adds the ability to change the [bar's](https://codeberg.org/dwl/dwl-patches/wiki/bar) height.
+
+### Download
+- [0.7](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/barheight/barheight.patch) (bar 0.7)
+- [git branch](https://codeberg.org/Oak/dwl/src/branch/barheight)
+
+### Authors
+- [Oak](https://codeberg.org/oak)
+
diff --git a/dwl-patches/patches/barheight/barheight.patch b/dwl-patches/patches/barheight/barheight.patch
new file mode 100644
index 0000000..4e28691
--- /dev/null
+++ b/dwl-patches/patches/barheight/barheight.patch
@@ -0,0 +1,38 @@
+From d2f3ac840845802eaf9ff7daf406f04722fd02aa Mon Sep 17 00:00:00 2001
+From: Oak <Oak@petrifiedoak.com>
+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
+