mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 20:06:00 +01:00
Fix plugin argument-less hyprctl calls (#1723)
Handle hyprctl command whitespace trimming might break
This commit is contained in:
parent
0aeb61a95a
commit
b11e2eaa3b
1 changed files with 5 additions and 3 deletions
|
@ -39,8 +39,10 @@ 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) {
|
APICALL std::string HyprlandAPI::invokeHyprctlCommand(const std::string& call, const std::string& args, const std::string& format) {
|
||||||
std::string COMMAND = format + "/" + call + " " + args;
|
if (args.empty())
|
||||||
return HyprCtl::makeDynamicCall(COMMAND);
|
return HyprCtl::makeDynamicCall(format + "/" + call);
|
||||||
|
else
|
||||||
|
return HyprCtl::makeDynamicCall(format + "/" + call + " " + args);
|
||||||
}
|
}
|
||||||
|
|
||||||
APICALL bool HyprlandAPI::addLayout(HANDLE handle, const std::string& name, IHyprLayout* layout) {
|
APICALL bool HyprlandAPI::addLayout(HANDLE handle, const std::string& name, IHyprLayout* layout) {
|
||||||
|
|
Loading…
Reference in a new issue