This commit is contained in:
dmitry
2023-06-28 02:52:01 +03:00
parent 4116490535
commit 33236c222f
7 changed files with 128 additions and 9 deletions

View File

@ -5,6 +5,7 @@
#include <mutex>
#include <string>
#include <thread>
#include "util/json.hpp"
namespace waybar::modules::hyprland {
@ -22,12 +23,14 @@ class IPC {
void unregisterForIPC(EventHandler*);
std::string getSocket1Reply(const std::string& rq);
Json::Value getSocket1JsonReply(const std::string& rq);
private:
void startIPC();
void parseIPC(const std::string&);
std::mutex callbackMutex;
util::JsonParser parser_;
std::list<std::pair<std::string, EventHandler*>> callbacks;
};