From 6dcae2cadeccc74e8c575be6caed8cde29682f1e Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 31 Jan 2024 22:57:20 +0100 Subject: [PATCH] fix: reload style --- src/client.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/client.cpp b/src/client.cpp index bd0ee41a..e32f8140 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -270,9 +270,18 @@ int waybar::Client::main(int argc, char *argv[]) { setupCss(css_file); }); - if (config.getConfig()["reload_style_on_change"].asBool()) { + auto config = config.getConfig(); + if (config.isObject() && config["reload_style_on_change"].asBool()) { m_cssReloadHelper->monitorChanges(); + } else if (config.isArray()) { + for (const auto &conf : config) { + if (conf["reload_style_on_change"].asBool()) { + m_cssReloadHelper->monitorChanges(); + break; + } + } } + bindInterfaces(); gtk_app->hold(); gtk_app->run();