diff --git a/include/factory.hpp b/include/factory.hpp index fcbf3a2..ebc2359 100644 --- a/include/factory.hpp +++ b/include/factory.hpp @@ -43,7 +43,9 @@ #include "modules/custom.hpp" #include "modules/temperature.hpp" #if defined(__linux__) -#include "modules/bluetooth.hpp" +# ifdef WANT_RFKILL +# include "modules/bluetooth.hpp" +# endif #endif namespace waybar { diff --git a/src/factory.cpp b/src/factory.cpp index 5a01d52..af93b20 100644 --- a/src/factory.cpp +++ b/src/factory.cpp @@ -81,9 +81,11 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name) const { return new waybar::modules::Temperature(id, config_[name]); } #if defined(__linux__) +# ifdef WANT_RFKILL if (ref == "bluetooth") { return new waybar::modules::Bluetooth(id, config_[name]); } +# endif #endif if (ref.compare(0, 7, "custom/") == 0 && ref.size() > 7) { return new waybar::modules::Custom(ref.substr(7), id, config_[name]);