2022-03-20 16:51:14 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../Compositor.hpp"
|
|
|
|
#include <fstream>
|
2022-04-04 19:44:25 +02:00
|
|
|
#include "../helpers/MiscFunctions.hpp"
|
2022-03-20 16:51:14 +01:00
|
|
|
|
|
|
|
namespace HyprCtl {
|
2023-02-27 13:32:38 +01:00
|
|
|
void startHyprCtlSocket();
|
|
|
|
std::string makeDynamicCall(const std::string& input);
|
2022-03-20 16:51:14 +01:00
|
|
|
|
2022-04-21 22:00:03 +02:00
|
|
|
// very simple thread-safe request method
|
2022-12-16 18:17:31 +01:00
|
|
|
inline bool requestMade = false;
|
|
|
|
inline bool requestReady = false;
|
|
|
|
inline std::string request = "";
|
2022-04-21 22:00:03 +02:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
inline std::ifstream requestStream;
|
2022-07-12 22:59:36 +02:00
|
|
|
|
2022-09-10 21:21:28 +02:00
|
|
|
inline wl_event_source* hyprCtlTickSource = nullptr;
|
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
inline int iSocketFD = -1;
|
2022-08-28 11:19:08 +02:00
|
|
|
|
2023-12-06 23:54:56 +01:00
|
|
|
enum eHyprCtlOutputFormat {
|
2022-07-12 22:59:36 +02:00
|
|
|
FORMAT_NORMAL = 0,
|
|
|
|
FORMAT_JSON
|
|
|
|
};
|
2022-03-20 16:51:14 +01:00
|
|
|
};
|