diff --git a/include/client.hpp b/include/client.hpp index 8faa7198..9ec29ef3 100644 --- a/include/client.hpp +++ b/include/client.hpp @@ -47,7 +47,6 @@ class Client { static void handleOutputDone(void *, struct zxdg_output_v1 *); static void handleOutputName(void *, struct zxdg_output_v1 *, const char *); static void handleOutputDescription(void *, struct zxdg_output_v1 *, const char *); - void handleAppearanceChanged(waybar::Appearance appearance); void handleMonitorAdded(Glib::RefPtr monitor); void handleMonitorRemoved(Glib::RefPtr monitor); void handleDeferredMonitorRemoval(Glib::RefPtr monitor); diff --git a/src/client.cpp b/src/client.cpp index 10073df0..cd0fa55b 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -154,9 +154,7 @@ void waybar::Client::handleDeferredMonitorRemoval(Glib::RefPtr mon const std::string waybar::Client::getStyle(const std::string &style, std::optional appearance = std::nullopt) { std::optional css_file; - if (!style.empty()) { - css_file = style; - } else { + if (style.empty()) { std::vector search_files; switch (appearance.value_or(portal->getAppearance())) { case waybar::Appearance::LIGHT: @@ -170,6 +168,8 @@ const std::string waybar::Client::getStyle(const std::string &style, } search_files.push_back("style.css"); css_file = Config::findConfigPath(search_files); + } else { + css_file = style; } if (!css_file) { throw std::runtime_error("Missing required resource files");