mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-09-07 19:54:50 +00:00
bar: 2024-06-26
This commit is contained in:
parent
d59e8cca26
commit
59d5b28396
@ -1,7 +1,7 @@
|
||||
From 0b471d8b8adbd79802beb035270f68c92465284c Mon Sep 17 00:00:00 2001
|
||||
From 9c06d4d025c8c543ff08ec62780794aec4be5ae8 Mon Sep 17 00:00:00 2001
|
||||
From: oak <oak@petrifiedoak.com>
|
||||
Date: Mon, 10 Jun 2024 21:25:56 +0200
|
||||
Subject: [PATCH] Implement barheight
|
||||
Date: Wed, 26 Jun 2024 10:35:14 +0200
|
||||
Subject: [PATCH] Implement barheight patch
|
||||
|
||||
---
|
||||
config.def.h | 1 +
|
||||
@ -9,30 +9,30 @@ Subject: [PATCH] Implement barheight
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index c4ab801..869cb7a 100644
|
||||
index 6024b7e..29e3f9c 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -17,6 +17,7 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
|
||||
/* bar */
|
||||
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 dwl will calculate bar height, >= 1 means dwl will use user_bh as bar height */
|
||||
static const char *fonts[] = {"monospace:size=10"};
|
||||
static pixman_color_t normbarfg = { 0xbbbb, 0xbbbb, 0xbbbb, 0xffff };
|
||||
static pixman_color_t normbarbg = { 0x2222, 0x2222, 0x2222, 0xffff };
|
||||
@@ -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 61c5727..49eded9 100644
|
||||
index 72b4abb..ee56ad7 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -3037,7 +3037,7 @@ updatebar(Monitor *m)
|
||||
@@ -3080,7 +3080,7 @@ updatebar(Monitor *m)
|
||||
|
||||
m->b.scale = m->wlr_output->scale;
|
||||
m->lrpad = m->font->height;
|
||||
- m->b.height = m->font->height + 2;
|
||||
+ m->b.height = user_bh ? user_bh : m->font->height + 2;
|
||||
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.44.0
|
||||
2.45.2
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user