From 66cb828bf8379c52ca17a1ece7ac472197575bab Mon Sep 17 00:00:00 2001 From: OliMoli Date: Tue, 7 Apr 2026 14:02:10 +0200 Subject: [PATCH 1/2] Add CSS selector for expanded drawers --- src/group.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/group.cpp b/src/group.cpp index acd7bd42..be0fd0f1 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -95,11 +95,13 @@ Group::Group(const std::string& name, const std::string& id, const Json::Value& void Group::show_group() { box.set_state_flags(Gtk::StateFlags::STATE_FLAG_PRELIGHT); revealer.set_reveal_child(true); + box.get_style_context()->add_class("expanded"); } void Group::hide_group() { box.unset_state_flags(Gtk::StateFlags::STATE_FLAG_PRELIGHT); revealer.set_reveal_child(false); + box.get_style_context()->remove_class("expanded"); } bool Group::handleMouseEnter(GdkEventCrossing* const& e) { From 7feb23c3dddbfc91b89b38643c2ab250a973c6bb Mon Sep 17 00:00:00 2001 From: OliMoli Date: Tue, 7 Apr 2026 16:29:59 +0200 Subject: [PATCH 2/2] Update manpage to mention the .expanded CSS class --- man/waybar.5.scd.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/man/waybar.5.scd.in b/man/waybar.5.scd.in index 8b923eef..c76755f4 100644 --- a/man/waybar.5.scd.in +++ b/man/waybar.5.scd.in @@ -374,6 +374,8 @@ A group may hide all but one element, showing them only on mouse hover. In order Defines the direction of the transition animation. If true, the hidden elements will slide from left to right. If false, they will slide from right to left. When the bar is vertical, it reads as top-to-bottom. +Group drawers are also given the `.expanded` CSS class when they are expanded. + ``` "group/power": { "orientation": "inherit",