This commit is contained in:
ItsOhen 2026-05-06 23:34:05 +02:00 committed by GitHub
commit a6fcfa1408
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,7 @@
#include "LuaBindingsInternal.hpp"
#include <hyprutils/string/String.hpp>
#include <lua.h>
#include "../../supplementary/executor/Executor.hpp"
@ -154,14 +155,16 @@ static int dsp_execCmd(lua_State* L) {
if (!pid.has_value())
return Internal::dispatcherError(L, "Failed to start process", ERR, C_EXECFAIL);
return Internal::pushSuccessResult(L);
lua_pushinteger(L, (lua_Integer)*pid);
return 1;
}
static int dsp_execRaw(lua_State* L) {
auto proc = Config::Supplementary::executor()->spawnRaw(lua_tostring(L, lua_upvalueindex(1)));
if (!proc || !*proc)
return Internal::dispatcherError(L, "Failed to start process", ERR, C_EXECFAIL);
return Internal::pushSuccessResult(L);
lua_pushinteger(L, (lua_Integer)*proc);
return 1;
}
static int dsp_exit(lua_State* L) {