Merge pull request #397 from Jamedjo/jej/add-css-classes-for-multiple-bars

Allow CSS to select specific waybars when multiple are in use
This commit is contained in:
Alex 2019-07-04 14:20:03 +02:00 committed by GitHub
commit 67ad0e69ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,8 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config)
window.set_name("waybar"); window.set_name("waybar");
window.set_decorated(false); window.set_decorated(false);
window.get_style_context()->add_class(output->name); 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") { if (config["position"] == "right" || config["position"] == "left") {
height_ = 0; height_ = 0;