mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-12 20:25:59 +01:00
29 lines
No EOL
808 B
C++
29 lines
No EOL
808 B
C++
#pragma once
|
|
|
|
#include "../Compositor.hpp"
|
|
#include <fstream>
|
|
#include "../helpers/MiscFunctions.hpp"
|
|
#include <functional>
|
|
|
|
class CHyprCtl {
|
|
public:
|
|
CHyprCtl();
|
|
|
|
std::string makeDynamicCall(const std::string& input);
|
|
std::shared_ptr<SHyprCtlCommand> registerCommand(SHyprCtlCommand cmd);
|
|
void unregisterCommand(const std::shared_ptr<SHyprCtlCommand>& cmd);
|
|
std::string getReply(std::string);
|
|
|
|
int m_iSocketFD = -1;
|
|
|
|
struct {
|
|
bool all = false;
|
|
} m_sCurrentRequestParams;
|
|
|
|
private:
|
|
void startHyprCtlSocket();
|
|
|
|
std::vector<std::shared_ptr<SHyprCtlCommand>> m_vCommands;
|
|
};
|
|
|
|
inline std::unique_ptr<CHyprCtl> g_pHyprCtl; |