mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
only return a bluetooth module from factory if the rfkill feature is enabled.
This commit is contained in:
parent
4565f7f8b9
commit
4d775008df
@ -43,8 +43,10 @@
|
||||
#include "modules/custom.hpp"
|
||||
#include "modules/temperature.hpp"
|
||||
#if defined(__linux__)
|
||||
# ifdef WANT_RFKILL
|
||||
# include "modules/bluetooth.hpp"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace waybar {
|
||||
|
||||
|
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user