aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/debug
diff options
context:
space:
mode:
authorIkalco <[email protected]>2024-08-24 11:45:53 -0500
committerGitHub <[email protected]>2024-08-24 18:45:53 +0200
commit66586c38f53f16bcf762f019359a3c9042546a72 (patch)
tree9a1f3b8b7796bd06765d32ec0f12d7298df59bf1 /src/debug
parent82c67e61a96b23c7b962ab8e3ed9079f671942e1 (diff)
downloadHyprland-66586c38f53f16bcf762f019359a3c9042546a72.tar.gz
Hyprland-66586c38f53f16bcf762f019359a3c9042546a72.zip
keybinds: refactor dispatchers to be better (#7331)
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/HyprCtl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 78c8504a..a92c3a53 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -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) {