2019-02-17 14:27:54 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <fmt/format.h>
|
2019-04-18 15:52:00 +00:00
|
|
|
#include "ALabel.hpp"
|
2019-02-17 14:27:54 +00:00
|
|
|
#include "bar.hpp"
|
|
|
|
#include "client.hpp"
|
|
|
|
|
|
|
|
namespace waybar::modules {
|
|
|
|
|
2019-04-18 15:52:00 +00:00
|
|
|
class IdleInhibitor : public ALabel {
|
|
|
|
public:
|
|
|
|
IdleInhibitor(const std::string&, const waybar::Bar&, const Json::Value&);
|
|
|
|
~IdleInhibitor();
|
|
|
|
auto update() -> void;
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool handleToggle(GdkEventButton* const& e);
|
2019-02-17 14:27:54 +00:00
|
|
|
|
2019-04-18 15:52:00 +00:00
|
|
|
const Bar& bar_;
|
|
|
|
std::string status_;
|
2019-04-23 13:56:38 +00:00
|
|
|
int pid_;
|
2019-02-17 14:27:54 +00:00
|
|
|
};
|
|
|
|
|
2019-04-18 15:52:00 +00:00
|
|
|
} // namespace waybar::modules
|