Merge pull request #2874 from Alexays/fix-reload-style

fix: reload style
This commit is contained in:
Alexis Rouillard 2024-01-31 23:09:54 +01:00 committed by GitHub
commit 4c5ff80bbd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 1 deletions

View File

@ -270,9 +270,18 @@ int waybar::Client::main(int argc, char *argv[]) {
setupCss(css_file);
});
if (config.getConfig()["reload_style_on_change"].asBool()) {
auto m_config = config.getConfig();
if (m_config.isObject() && m_config["reload_style_on_change"].asBool()) {
m_cssReloadHelper->monitorChanges();
} else if (m_config.isArray()) {
for (const auto &conf : m_config) {
if (conf["reload_style_on_change"].asBool()) {
m_cssReloadHelper->monitorChanges();
break;
}
}
}
bindInterfaces();
gtk_app->hold();
gtk_app->run();