update barheight for bar 0.7

This commit is contained in:
Oak 2024-08-25 17:45:25 +02:00
parent 2c9f573600
commit 07565348c1
No known key found for this signature in database
GPG Key ID: 354D49BAFA845D47
2 changed files with 9 additions and 9 deletions

View File

@ -3,7 +3,7 @@
Adds the ability to change the [bar's](https://codeberg.org/dwl/dwl-patches/wiki/bar) height.
### Download
- [2024-06-26](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/barheight/barheight.patch) (bar 2024-06-26)
- [2024-08-25](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

View File

@ -1,6 +1,6 @@
From 9c06d4d025c8c543ff08ec62780794aec4be5ae8 Mon Sep 17 00:00:00 2001
From: oak <oak@petrifiedoak.com>
Date: Wed, 26 Jun 2024 10:35:14 +0200
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
---
@ -9,7 +9,7 @@ Subject: [PATCH] Implement barheight patch
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/config.def.h b/config.def.h
index 6024b7e..29e3f9c 100644
index 5d1dc2b..f11089c 100644
--- a/config.def.h
+++ b/config.def.h
@@ -7,6 +7,7 @@
@ -21,18 +21,18 @@ index 6024b7e..29e3f9c 100644
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 72b4abb..ee56ad7 100644
index ece537a..2863202 100644
--- a/dwl.c
+++ b/dwl.c
@@ -3080,7 +3080,7 @@ updatebar(Monitor *m)
@@ -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.height = user_bh ? user_bh : m->drw->font->height + 2;
m->b.real_height = (int)((float)m->b.height / m->wlr_output->scale);
}
--
2.45.2
2.46.0