From 98b08880409cfd1277dc491b2f89de39a5107e50 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Thu, 2 May 2024 22:39:00 +0200 Subject: [PATCH] feat: add DWL active_other for singletagset --- protocol/dwl-ipc-unstable-v2.xml | 1 + src/modules/dwl/tags.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/protocol/dwl-ipc-unstable-v2.xml b/protocol/dwl-ipc-unstable-v2.xml index 74a212f07..be5bda9d5 100644 --- a/protocol/dwl-ipc-unstable-v2.xml +++ b/protocol/dwl-ipc-unstable-v2.xml @@ -75,6 +75,7 @@ I would probably just submit raphi's patchset but I don't think that would be po + diff --git a/src/modules/dwl/tags.cpp b/src/modules/dwl/tags.cpp index 085b82246..462ae91b9 100644 --- a/src/modules/dwl/tags.cpp +++ b/src/modules/dwl/tags.cpp @@ -13,6 +13,7 @@ #define TAG_INACTIVE 0 #define TAG_ACTIVE 1 #define TAG_URGENT 2 +#define TAG_ACTIVE_OTHER 4 namespace waybar::modules::dwl { @@ -198,6 +199,12 @@ void Tags::handle_view_tags(uint32_t tag, uint32_t state, uint32_t clients, uint } else { button.get_style_context()->remove_class("urgent"); } + + if (state & TAG_ACTIVE_OTHER) { + button.get_style_context()->add_class("focused-other"); + } else { + button.get_style_context()->remove_class("focused-other"); + } } } /* namespace waybar::modules::dwl */