Add backlight module

Monitor the backlight level via udev. Poll every `interval` as well,
in case backlight udev events aren't supported.
This commit is contained in:
Ian Hattendorf
2019-02-10 02:35:19 -07:00
parent 6bf4f65228
commit 875306804c
7 changed files with 369 additions and 3 deletions

View File

@ -48,6 +48,9 @@ waybar::IModule* waybar::Factory::makeModule(const std::string &name) const
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]);
}