keybinds: refactor dispatchers to be better (#7331)
This commit is contained in:
parent
82c67e61a9
commit
66586c38f5
4 changed files with 457 additions and 305 deletions
|
|
@ -962,11 +962,11 @@ std::string dispatchRequest(eHyprCtlOutputFormat format, std::string in) {
|
|||
if (DISPATCHER == g_pKeybindManager->m_mDispatchers.end())
|
||||
return "Invalid dispatcher";
|
||||
|
||||
DISPATCHER->second(DISPATCHARG);
|
||||
SDispatchResult res = DISPATCHER->second(DISPATCHARG);
|
||||
|
||||
Debug::log(LOG, "Hyprctl: dispatcher {} : {}", DISPATCHSTR, DISPATCHARG);
|
||||
Debug::log(LOG, "Hyprctl: dispatcher {} : {}{}", DISPATCHSTR, DISPATCHARG, res.success ? "" : " -> " + res.error);
|
||||
|
||||
return "ok";
|
||||
return res.success ? "ok" : res.error;
|
||||
}
|
||||
|
||||
std::string dispatchKeyword(eHyprCtlOutputFormat format, std::string in) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue