From 4f3c38c542208a7c8b55b3c5c33f023318dc5f8f Mon Sep 17 00:00:00 2001 From: James Edwards-Jones Date: Thu, 4 Jul 2019 02:02:09 +0100 Subject: [PATCH 1/2] feat(bar): add CSS class for window position --- src/bar.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bar.cpp b/src/bar.cpp index 860bcec..7096427 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -18,6 +18,7 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config) window.set_name("waybar"); window.set_decorated(false); window.get_style_context()->add_class(output->name); + window.get_style_context()->add_class(config["position"].asString()); if (config["position"] == "right" || config["position"] == "left") { height_ = 0; From ae88d6bc3cd83b2deb9c4ac80d2b86483ba39e97 Mon Sep 17 00:00:00 2001 From: James Edwards-Jones Date: Thu, 4 Jul 2019 02:09:31 +0100 Subject: [PATCH 2/2] feat(bar): individual bars can be named for CSS Allows CSS to select individual waybars when multiple are configured --- src/bar.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bar.cpp b/src/bar.cpp index 7096427..8a45869 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -18,6 +18,7 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config) window.set_name("waybar"); window.set_decorated(false); window.get_style_context()->add_class(output->name); + window.get_style_context()->add_class(config["name"].asString()); window.get_style_context()->add_class(config["position"].asString()); if (config["position"] == "right" || config["position"] == "left") {