summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index bb575ce5..540a28e2 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -1258,7 +1258,7 @@ static std::string evalRequest(eHyprCtlOutputFormat format, std::string request)
auto err = luaMgr->eval(code);
if (err)
- return std::format("error: {}", *err);
+ return *err;
return "ok";
}
@@ -1269,7 +1269,7 @@ static std::string dispatchRequest(eHyprCtlOutputFormat format, std::string in)
if (Config::mgr()->type() == Config::CONFIG_LUA) {
// For lua, this is just a wrapper for `eval("hl.dispatch(in)")
- std::string evalStr = std::format("hl.dispatch({})", in);
+ std::string evalStr = std::format("return hl.dispatch({})", in);
auto luaMgr = dynamicPointerCast<Config::Lua::CConfigManager>(WP<Config::IConfigManager>(Config::mgr()));
auto ret = luaMgr->eval(evalStr).value_or("ok");