Merge pull request #2874 from Alexays/fix-reload-style
fix: reload style
This commit is contained in:
commit
4c5ff80bbd
|
@ -270,9 +270,18 @@ int waybar::Client::main(int argc, char *argv[]) {
|
||||||
setupCss(css_file);
|
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();
|
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();
|
bindInterfaces();
|
||||||
gtk_app->hold();
|
gtk_app->hold();
|
||||||
gtk_app->run();
|
gtk_app->run();
|
||||||
|
|
Loading…
Reference in New Issue