barborder: 0.7

This commit is contained in:
sewn 2024-08-05 01:45:40 +03:00
parent 5716f26d02
commit 2929e8ac46
No known key found for this signature in database
2 changed files with 12 additions and 13 deletions

View File

@ -1,10 +1,9 @@
### Description
Add a border around the [bar](https://codeberg.org/dwl/dwl-patches/wiki/bar) similar to how a client is given a border.
Add a border around the [bar](/dwl/dwl-patches/wiki/bar) similar to how a client is given a border.
### Download
- [git branch](https://codeberg.org/sewn/dwl/src/branch/barborder)
- [2024-06-26](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/barborder/barborder.patch) (bar 2024-06-26)
- [0.7](/dwl/dwl-patches/raw/branch/main/patches/barborder/barborder.patch)
### Authors
- [sewn](https://codeberg.org/sewn)

View File

@ -1,4 +1,4 @@
From 7fbc305cacfba68568caed79b73603dae5389328 Mon Sep 17 00:00:00 2001
From e817d93091258fbf338f7db6c2a0864a99ac643c Mon Sep 17 00:00:00 2001
From: sewn <sewn@disroot.org>
Date: Mon, 10 Jun 2024 14:59:12 +0300
Subject: [PATCH] add border to bar
@ -9,7 +9,7 @@ Subject: [PATCH] add border to bar
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/config.def.h b/config.def.h
index 6024b7e..86c07d6 100644
index 5d1dc2b..4763482 100644
--- a/config.def.h
+++ b/config.def.h
@@ -6,7 +6,7 @@
@ -30,7 +30,7 @@ index 6024b7e..86c07d6 100644
/* tagging - TAGCOUNT must be no greater than 31 */
diff --git a/dwl.c b/dwl.c
index 72b4abb..1f40d5e 100644
index 8614fdd..296e926 100644
--- a/dwl.c
+++ b/dwl.c
@@ -85,7 +85,7 @@
@ -42,7 +42,7 @@ index 72b4abb..1f40d5e 100644
enum { CurNormal, CurPressed, CurMove, CurResize }; /* cursor */
enum { XDGShell, LayerShell, X11 }; /* client types */
enum { LyrBg, LyrBottom, LyrTile, LyrFloat, LyrTop, LyrFS, LyrOverlay, LyrBlock, NUM_LAYERS }; /* scene layers */
@@ -1426,7 +1426,8 @@ dirtomon(enum wlr_direction dir)
@@ -1458,7 +1458,8 @@ dirtomon(enum wlr_direction dir)
void
drawbar(Monitor *m)
{
@ -52,8 +52,8 @@ index 72b4abb..1f40d5e 100644
int boxs = m->drw->font->height / 9;
int boxw = m->drw->font->height / 6 + 2;
uint32_t i, occ = 0, urg = 0;
@@ -1437,6 +1438,8 @@ drawbar(Monitor *m)
if (!m->showbar)
@@ -1469,6 +1470,8 @@ drawbar(Monitor *m)
if (!m->scene_buffer->node.enabled)
return;
+ mh = m->b.height - borderpx * 2;
@ -61,7 +61,7 @@ index 72b4abb..1f40d5e 100644
stride = drwl_stride(m->b.width);
size = stride * m->b.height;
@@ -1446,11 +1449,15 @@ drawbar(Monitor *m)
@@ -1478,11 +1481,15 @@ drawbar(Monitor *m)
drwl_prepare_drawing(m->drw, m->b.width, m->b.height, buf->data, stride);
@ -78,7 +78,7 @@ index 72b4abb..1f40d5e 100644
}
wl_list_for_each(c, &clients, link) {
@@ -1460,31 +1467,31 @@ drawbar(Monitor *m)
@@ -1492,31 +1499,31 @@ drawbar(Monitor *m)
if (c->isurgent)
urg |= c->tags;
}
@ -118,7 +118,7 @@ index 72b4abb..1f40d5e 100644
}
}
@@ -3080,7 +3087,7 @@ updatebar(Monitor *m)
@@ -3137,7 +3144,7 @@ updatebar(Monitor *m)
m->b.scale = m->wlr_output->scale;
m->lrpad = m->drw->font->height;
@ -128,5 +128,5 @@ index 72b4abb..1f40d5e 100644
}
--
2.45.2
2.46.0