Skip to content

Commit

Permalink
Merge pull request #2874 from Alexays/fix-reload-style
Browse files Browse the repository at this point in the history
fix: reload style
  • Loading branch information
Alexays authored Jan 31, 2024
2 parents fb6658e + f101632 commit 4c5ff80
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Check warning on line 273 in src/client.cpp

View workflow job for this annotation

GitHub Actions / build

src/client.cpp:273:8 [readability-identifier-naming]

invalid case style for variable 'm_config'
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();
Expand Down

0 comments on commit 4c5ff80

Please sign in to comment.