hide_vacant_tags: 0.7

This commit is contained in:
sewn 2024-08-05 01:40:35 +03:00
parent f07a53ba49
commit 12734cebea
No known key found for this signature in database
2 changed files with 8 additions and 9 deletions

View File

@ -1,11 +1,10 @@
### Description
Prevent [bar](https://codeberg.org/dwl/dwl-patches/wiki/bar) from drawing tags with no clients (i.e. vacant).
Prevent [bar](/dwl/dwl-patches/wiki/bar) from drawing tags with no clients (i.e. vacant).
It also stops drawing empty rectangles on the bar for non-vacant tags as there is no need anymore to distinguish vacant tags and it offers a more visible contrast than if there were filled/empty rectangles.
### Download
- [git branch](https://codeberg.org/sewn/dwl/src/branch/hide_vacant_tags)
- [2024-06-27](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/hide_vacant_tags/hide_vacant_tags.patch) (bar 2024-06-27)
- [0.7](/dwl/dwl-patches/raw/branch/main/patches/hide_vacant_tags/hide_vacant_tags.patch)
### Authors
- [sewn](https://codeberg.org/sewn)

View File

@ -1,4 +1,4 @@
From 36858035cdf73f08d94d80bf4aa4251200f5ac80 Mon Sep 17 00:00:00 2001
From e656646fa3723b50b62e53313d35dc2509bcb9b8 Mon Sep 17 00:00:00 2001
From: sewn <sewn@disroot.org>
Date: Mon, 10 Jun 2024 14:50:07 +0300
Subject: [PATCH] hide vacant tags
@ -9,10 +9,10 @@ https://dwm.suckless.org/patches/hide_vacant_tags/
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/dwl.c b/dwl.c
index 9fdddc7..2b068ce 100644
index 8614fdd..477db69 100644
--- a/dwl.c
+++ b/dwl.c
@@ -675,7 +675,7 @@ buffer_end_data_ptr_access(struct wlr_buffer *buffer)
@@ -676,7 +676,7 @@ buffer_end_data_ptr_access(struct wlr_buffer *buffer)
void
buttonpress(struct wl_listener *listener, void *data)
{
@ -21,7 +21,7 @@ index 9fdddc7..2b068ce 100644
unsigned int click;
struct wlr_pointer_button_event *event = data;
struct wlr_keyboard *keyboard;
@@ -699,9 +699,16 @@ buttonpress(struct wl_listener *listener, void *data)
@@ -700,9 +700,16 @@ buttonpress(struct wl_listener *listener, void *data)
cursor->x *= selmon->wlr_output->scale;
cursor->y *= selmon->wlr_output->scale;
x = selmon->m.x;
@ -40,7 +40,7 @@ index 9fdddc7..2b068ce 100644
if (i < LENGTH(tags)) {
click = ClkTagBar;
arg.ui = 1 << i;
@@ -1456,13 +1463,15 @@ drawbar(Monitor *m)
@@ -1488,13 +1495,15 @@ drawbar(Monitor *m)
wl_list_for_each(c, &clients, link) {
if (c->mon != m)
continue;
@ -58,5 +58,5 @@ index 9fdddc7..2b068ce 100644
drwl_setscheme(m->drw, colors[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, tags[i], urg & 1 << i);
--
2.45.2
2.46.0