2023-10-15 20:42:19 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ASlider.hpp"
|
|
|
|
#include "util/backlight_backend.hpp"
|
|
|
|
|
|
|
|
namespace waybar::modules {
|
|
|
|
|
2024-02-27 20:17:50 +00:00
|
|
|
class BacklightSlider final : public ASlider {
|
2023-10-15 20:42:19 +00:00
|
|
|
public:
|
|
|
|
BacklightSlider(const std::string&, const Json::Value&);
|
|
|
|
virtual ~BacklightSlider() = default;
|
|
|
|
|
|
|
|
void update() override;
|
|
|
|
void onValueChanged() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::chrono::milliseconds interval_;
|
|
|
|
std::string preferred_device_;
|
|
|
|
util::BacklightBackend backend;
|
|
|
|
};
|
|
|
|
|
2024-02-27 20:17:50 +00:00
|
|
|
} // namespace waybar::modules
|