From 20fa578b12212591299d2010f1b6f8d5c117dcde Mon Sep 17 00:00:00 2001 From: dpayne Date: Sun, 21 Jan 2024 21:02:01 -0800 Subject: [PATCH] Adding config option to enable reloading style on file change --- src/client.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index ff1be5d8..bd0ee41a 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -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; }