feat: backlight slider

This commit is contained in:
Brenno Lemos
2023-10-15 17:42:19 -03:00
parent c3779dd16e
commit 11d7ca1d73
7 changed files with 161 additions and 3 deletions

View File

@ -4,6 +4,10 @@
#include "modules/pulseaudio_slider.hpp"
#endif
#ifdef HAVE_LIBUDEV
#include "modules/backlight_slider.hpp"
#endif
waybar::Factory::Factory(const Bar& bar, const Json::Value& config) : bar_(bar), config_(config) {}
waybar::AModule* waybar::Factory::makeModule(const std::string& name) const {
@ -130,6 +134,9 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name) const {
if (ref == "backlight") {
return new waybar::modules::Backlight(id, config_[name]);
}
if (ref == "backlight/slider") {
return new waybar::modules::BacklightSlider(id, config_[name]);
}
#endif
#ifdef HAVE_LIBEVDEV
if (ref == "keyboard-state") {