Gate backlight module behind libudev availability

This commit is contained in:
Ian Hattendorf
2019-02-18 21:11:18 -07:00
parent 875306804c
commit e67347f6ad
4 changed files with 15 additions and 6 deletions

View File

@ -43,14 +43,16 @@ waybar::IModule* waybar::Factory::makeModule(const std::string &name) const
return new waybar::modules::Network(id, config_[name]);
}
#endif
#ifdef HAVE_LIBUDEV
if (ref == "backlight") {
return new waybar::modules::Backlight(id, config_[name]);
}
#endif
#ifdef HAVE_LIBPULSE
if (ref == "pulseaudio") {
return new waybar::modules::Pulseaudio(id, config_[name]);
}
#endif
if (ref == "backlight") {
return new waybar::modules::Backlight(id, config_[name]);
}
if (ref.compare(0, 7, "custom/") == 0 && ref.size() > 7) {
return new waybar::modules::Custom(ref.substr(7), config_[name]);
}