#pragma once #include "../Compositor.hpp" #include #include "../helpers/MiscFunctions.hpp" #include class CHyprCtl { public: CHyprCtl(); enum eHyprCtlOutputFormat { FORMAT_NORMAL = 0, FORMAT_JSON }; struct SCommand { std::string name = ""; bool exact = true; std::function fn; }; std::string makeDynamicCall(const std::string& input); std::shared_ptr registerCommand(SCommand cmd); void unregisterCommand(const std::shared_ptr& cmd); std::string getReply(std::string); int m_iSocketFD = -1; private: void startHyprCtlSocket(); std::vector> m_vCommands; }; inline std::unique_ptr g_pHyprCtl;