summaryrefslogtreecommitdiff
path: root/localports
diff options
context:
space:
mode:
Diffstat (limited to 'localports')
-rw-r--r--localports/somebar/APKBUILD2
-rw-r--r--localports/somebar/dwm-like-tag-indicator.patch34
2 files changed, 36 insertions, 0 deletions
diff --git a/localports/somebar/APKBUILD b/localports/somebar/APKBUILD
index d402733..08779d9 100644
--- a/localports/somebar/APKBUILD
+++ b/localports/somebar/APKBUILD
@@ -11,6 +11,7 @@ install=""
options="!check" # no tests
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~raphi/somebar/archive/$pkgver.tar.gz
+ dwm-like-tag-indicator.patch
config.hpp
"
@@ -34,5 +35,6 @@ package() {
sha512sums="
6294aaf3e9bc20b6fbc2221038f044ca505096e78b96981a234d0b0858d4a57bd1ffd5d1b53930b820e97b1fddf9a5149eaa1cb22e300629f92d197e3d5d7e5d somebar-1.0.3.tar.gz
+982c0d1479a72061d8609b4dd6e372539befcf1f1628487c523bd98d815a1894da0e889d9e7c9fca643de4d4e7ef4d4dc5574d417fa4a5ee79fa13b9b5ed6811 dwm-like-tag-indicator.patch
c6603d2b61fb8010c17940db4d07056618c29bed1cb93691539863ae1451daab79f1629a5f76f2a9831c205d3eaba8a8345531e680b1b326aec0d1c36159b7ea config.hpp
"
diff --git a/localports/somebar/dwm-like-tag-indicator.patch b/localports/somebar/dwm-like-tag-indicator.patch
new file mode 100644
index 0000000..c4458e9
--- /dev/null
+++ b/localports/somebar/dwm-like-tag-indicator.patch
@@ -0,0 +1,34 @@
+From: Henrique Possatto <henriquempossatto@gmail.com>
+Date: Mon, 26 Dec 2022 18:01:35 -0300
+Subject: [PATCH somebar] patch to show square tag indicator like dwm
+diff --git a/src/bar.cpp b/src/bar.cpp
+index 507ce62..4fda8b0 100644
+--- a/src/bar.cpp
++++ b/src/bar.cpp
+@@ -245,12 +245,17 @@ void Bar::renderTags()
+ tag.state & TagState::Active ? colorActive : colorInactive,
+ tag.state & TagState::Urgent);
+ renderComponent(tag.component);
+- auto indicators = std::min(tag.numClients, static_cast<int>(_bufs->height/2));
+- for (auto ind = 0; ind < indicators; ind++) {
+- auto w = ind == tag.focusedClient ? 7 : 1;
+- cairo_move_to(_painter, tag.component.x, ind*2+0.5);
+- cairo_rel_line_to(_painter, w, 0);
+- cairo_close_path(_painter);
++
++ if(!tag.numClients)
++ continue;
++
++ int s = barfont.height / 9;
++ int w = barfont.height / 6 + 2;
++ if (tag.focusedClient != -1) {
++ cairo_rectangle(_painter, tag.component.x + s, s, w, w);
++ cairo_fill(_painter);
++ } else {
++ cairo_rectangle(_painter, (double)(tag.component.x + s) + 0.5, (double)(s) + 0.5, w, w);
+ cairo_set_line_width(_painter, 1);
+ cairo_stroke(_painter);
+ }
+--
+2.39.0
+