2018-08-09 23:55:38 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <fmt/format.h>
|
2022-04-06 08:37:19 +02:00
|
|
|
|
2018-08-13 22:33:07 +02:00
|
|
|
#include <algorithm>
|
2019-08-09 09:05:34 +00:00
|
|
|
#include <array>
|
2023-10-15 10:16:49 -03:00
|
|
|
#include <memory>
|
2022-04-06 08:37:19 +02:00
|
|
|
|
2022-11-24 12:28:52 +01:00
|
|
|
#include "ALabel.hpp"
|
2023-10-15 10:16:49 -03:00
|
|
|
#include "util/audio_backend.hpp"
|
2018-08-09 23:55:38 +02:00
|
|
|
|
|
|
|
|
namespace waybar::modules {
|
|
|
|
|
|
2022-11-24 12:28:52 +01:00
|
|
|
class Pulseaudio : public ALabel {
|
2019-04-18 17:52:00 +02:00
|
|
|
public:
|
|
|
|
|
Pulseaudio(const std::string&, const Json::Value&);
|
2023-10-15 10:16:49 -03:00
|
|
|
virtual ~Pulseaudio() = default;
|
2023-03-02 16:57:07 +03:00
|
|
|
auto update() -> void override;
|
2018-08-16 14:29:41 +02:00
|
|
|
|
2019-04-18 17:52:00 +02:00
|
|
|
private:
|
2023-03-02 16:57:07 +03:00
|
|
|
bool handleScroll(GdkEventScroll* e) override;
|
2021-07-15 08:52:02 +02:00
|
|
|
const std::vector<std::string> getPulseIcon() const;
|
2019-04-18 17:52:00 +02:00
|
|
|
|
2023-10-15 10:16:49 -03:00
|
|
|
std::shared_ptr<util::AudioBackend> backend = nullptr;
|
2018-08-16 14:29:41 +02:00
|
|
|
};
|
2018-08-09 23:55:38 +02:00
|
|
|
|
2018-10-29 21:48:35 +05:30
|
|
|
} // namespace waybar::modules
|