summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
authorMightyPlaza <123664421+MightyPlaza@users.noreply.github.com>2023-07-16 19:01:06 +0000
committerGitHub <noreply@github.com>2023-07-16 21:01:06 +0200
commitddb8c897762d47a22867c77897c6e39513e36029 (patch)
tree2b0129add3ee7139c75eb37868091325c932393c /src/debug/HyprCtl.cpp
parentcacdb424a9c6540b56d8d35e632002ae71387381 (diff)
Allow empty args in hyprctl dispatch (#2724)
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index c7a5e41c..5c9b329e 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -686,8 +686,11 @@ std::string dispatchRequest(std::string in) {
in = in.substr(in.find_first_of(' ') + 1);
const auto DISPATCHSTR = in.substr(0, in.find_first_of(' '));
+
+ auto DISPATCHARG = std::string();
+ if ((int) in.find_first_of(' ') != -1)
+ DISPATCHARG = in.substr(in.find_first_of(' ') + 1);
- const auto DISPATCHARG = in.substr(in.find_first_of(' ') + 1);
const auto DISPATCHER = g_pKeybindManager->m_mDispatchers.find(DISPATCHSTR);
if (DISPATCHER == g_pKeybindManager->m_mDispatchers.end())