mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-09-07 11:44:51 +00:00
barpadding: 0.7
This commit is contained in:
parent
12734cebea
commit
5716f26d02
@ -1,10 +1,9 @@
|
||||
### Description
|
||||
|
||||
Add vertical and horizontal space between the [bar](https://codeberg.org/dwl/dwl-patches/wiki/bar) and the edge of the screen.
|
||||
Add vertical and horizontal space between the [bar](/dwl/dwl-patches/wiki/bar) and the edge of the screen.
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sewn/dwl/src/branch/barborder)
|
||||
- [2024-06-26](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/barpadding/barpadding.patch) (bar 2024-06-26)
|
||||
- [0.7](/dwl/dwl-patches/raw/branch/main/patches/barpadding/barpadding.patch)
|
||||
|
||||
### Authors
|
||||
- [sewn](https://codeberg.org/sewn)
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 504fb68dc63072b7184273c658f572bca1688996 Mon Sep 17 00:00:00 2001
|
||||
From 634ee6c1692224004c9163aaff33e88b1febb966 Mon Sep 17 00:00:00 2001
|
||||
From: sewn <sewn@disroot.org>
|
||||
Date: Mon, 10 Jun 2024 16:33:52 +0300
|
||||
Subject: [PATCH] add vertical and horizontal spacing to bar
|
||||
@ -10,7 +10,7 @@ https://dwm.suckless.org/patches/barpadding/
|
||||
2 files changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 6024b7e..4d438ab 100644
|
||||
index 5d1dc2b..756b1ae 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -9,6 +9,8 @@ static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will
|
||||
@ -23,21 +23,21 @@ index 6024b7e..4d438ab 100644
|
||||
static const float rootcolor[] = COLOR(0x000000ff);
|
||||
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 72b4abb..b26cb9c 100644
|
||||
index 8614fdd..2eb00cf 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -591,8 +591,8 @@ arrangelayers(Monitor *m)
|
||||
@@ -592,8 +592,8 @@ arrangelayers(Monitor *m)
|
||||
return;
|
||||
|
||||
if (m->showbar) {
|
||||
if (m->scene_buffer->node.enabled) {
|
||||
- usable_area.height -= m->b.real_height;
|
||||
- usable_area.y += topbar ? m->b.real_height : 0;
|
||||
+ usable_area.height -= m->b.real_height + vertpad;
|
||||
+ usable_area.y += topbar ? m->b.height + vertpad : 0;
|
||||
+ usable_area.y += topbar ? m->b.real_height + vertpad : 0;
|
||||
}
|
||||
|
||||
/* Arrange exclusive surfaces from top->bottom */
|
||||
@@ -1491,8 +1491,8 @@ drawbar(Monitor *m)
|
||||
@@ -1523,8 +1523,8 @@ drawbar(Monitor *m)
|
||||
drwl_finish_drawing(m->drw);
|
||||
wlr_scene_buffer_set_dest_size(m->scene_buffer,
|
||||
m->b.real_width, m->b.real_height);
|
||||
@ -48,7 +48,7 @@ index 72b4abb..b26cb9c 100644
|
||||
wlr_scene_buffer_set_buffer(m->scene_buffer, &buf->base);
|
||||
wlr_buffer_drop(&buf->base);
|
||||
}
|
||||
@@ -3067,7 +3067,7 @@ updatebar(Monitor *m)
|
||||
@@ -3122,7 +3122,7 @@ updatebar(Monitor *m)
|
||||
char fontattrs[12];
|
||||
|
||||
wlr_output_transformed_resolution(m->wlr_output, &rw, &rh);
|
||||
@ -56,7 +56,7 @@ index 72b4abb..b26cb9c 100644
|
||||
+ m->b.width = rw - 2 * sidepad;
|
||||
m->b.real_width = (int)((float)m->b.width / m->wlr_output->scale);
|
||||
|
||||
if (m->b.scale == m->wlr_output->scale && m->drw)
|
||||
wlr_scene_node_set_enabled(&m->scene_buffer->node, m->wlr_output->enabled ? showbar : 0);
|
||||
--
|
||||
2.45.2
|
||||
2.46.0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user