Add idle inhibitor module

This commit is contained in:
Jonas
2019-02-17 15:27:54 +01:00
parent 83a6475510
commit d708ce2be9
11 changed files with 98 additions and 3 deletions

View File

@ -0,0 +1,23 @@
#pragma once
#include <fmt/format.h>
#include "bar.hpp"
#include "client.hpp"
#include "ALabel.hpp"
namespace waybar::modules {
class IdleInhibitor: public ALabel {
public:
IdleInhibitor(const std::string&, const waybar::Bar&, const Json::Value&);
~IdleInhibitor();
auto update() -> void;
private:
bool onClick(GdkEventButton* const& ev);
const Bar& bar_;
std::string status_;
struct zwp_idle_inhibitor_v1 *idle_inhibitor_;
};
}