mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-09-07 19:54:50 +00:00
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
From 9c06d4d025c8c543ff08ec62780794aec4be5ae8 Mon Sep 17 00:00:00 2001
|
|
From: oak <oak@petrifiedoak.com>
|
|
Date: Wed, 26 Jun 2024 10:35:14 +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 6024b7e..29e3f9c 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 72b4abb..ee56ad7 100644
|
|
--- a/dwl.c
|
|
+++ b/dwl.c
|
|
@@ -3080,7 +3080,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.45.2
|
|
|