feat(dwl/tags): add empty tag option

Added option in the `dwl/tags` to theme empty tags (i.e. tags without any clients) in `style.css` using
`#tags button.empty`.

Signed-off-by: ospafford <ospafford@gmail.com>
This commit is contained in:
Owen Spafford 2025-12-09 07:05:21 -08:00
parent 161367d961
commit 07cb2c02d2
2 changed files with 7 additions and 0 deletions

View File

@ -43,6 +43,7 @@ Addressed by *dwl/tags*
- *#tags button*
- *#tags button.occupied*
- *#tags button.empty*
- *#tags button.focused*
- *#tags button.urgent*

View File

@ -187,6 +187,12 @@ void Tags::handle_view_tags(uint32_t tag, uint32_t state, uint32_t clients, uint
button.get_style_context()->remove_class("occupied");
}
if (clients & TAG_INACTIVE) {
button.get_style_context()->remove_class("empty");
} else {
button.get_style_context()->add_class("empty");
}
if (state & TAG_ACTIVE) {
button.get_style_context()->add_class("focused");
} else {