Skip to content

Commit

Permalink
Adding config option to enable reloading style on file change
Browse files Browse the repository at this point in the history
  • Loading branch information
dpayne committed Jan 22, 2024
1 parent f7eca99 commit 20fa578
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,14 @@ int waybar::Client::main(int argc, char *argv[]) {
auto css_file = getStyle(style_opt, appearance);
setupCss(css_file);
});
m_cssReloadHelper->monitorChanges();

if (config.getConfig()["reload_style_on_change"].asBool()) {
m_cssReloadHelper->monitorChanges();
}
bindInterfaces();
gtk_app->hold();
gtk_app->run();
m_cssReloadHelper.reset(); // stop watching css file
m_cssReloadHelper.reset(); // stop watching css file
bars.clear();
return 0;
}
Expand Down

0 comments on commit 20fa578

Please sign in to comment.