mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-20 01:42:38 +02:00
Gate backlight module behind libudev availability
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user