hyprctl: move to a class and unify commands

This commit is contained in:
Vaxry
2024-02-05 01:43:45 +00:00
parent cbadf3e3f3
commit 939696f97e
6 changed files with 165 additions and 155 deletions

View File

@@ -50,9 +50,9 @@ APICALL bool HyprlandAPI::unregisterCallback(HANDLE handle, HOOK_CALLBACK_FN* fn
APICALL std::string HyprlandAPI::invokeHyprctlCommand(const std::string& call, const std::string& args, const std::string& format) {
if (args.empty())
return HyprCtl::makeDynamicCall(format + "/" + call);
return g_pHyprCtl->makeDynamicCall(format + "/" + call);
else
return HyprCtl::makeDynamicCall(format + "/" + call + " " + args);
return g_pHyprCtl->makeDynamicCall(format + "/" + call + " " + args);
}
APICALL bool HyprlandAPI::addLayout(HANDLE handle, const std::string& name, IHyprLayout* layout) {