summaryrefslogtreecommitdiff
path: root/src/config/lua
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2026-05-01 12:50:51 +0100
committerVaxry <vaxry@vaxry.net>2026-05-01 12:50:55 +0100
commit241eeae51a8570fa48cffc89492b666697c4715f (patch)
tree1e02d57ec3b3455a9bf01508c35ba8f8432edfe4 /src/config/lua
parente2ba19535ddf3a3f4d0ce3236403895d9e7661cc (diff)
config/lua: add noop
Diffstat (limited to 'src/config/lua')
-rw-r--r--src/config/lua/bindings/LuaBindingsDispatchers.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config/lua/bindings/LuaBindingsDispatchers.cpp b/src/config/lua/bindings/LuaBindingsDispatchers.cpp
index fc84895a..0b6ca07a 100644
--- a/src/config/lua/bindings/LuaBindingsDispatchers.cpp
+++ b/src/config/lua/bindings/LuaBindingsDispatchers.cpp
@@ -1093,6 +1093,15 @@ static int hlFocus(lua_State* L) {
return Internal::configError(L, "hl.focus: unrecognized arguments. Expected one of: direction, monitor, window, urgent_or_last, last");
}
+static int dsp_noop(lua_State* L) {
+ return 0;
+}
+
+static int hlNoop(lua_State* L) {
+ lua_pushcclosure(L, dsp_noop, 0);
+ return 1;
+}
+
static int dsp_toggleSpecial(lua_State* L) {
std::string name = lua_isnil(L, lua_upvalueindex(1)) ? "" : lua_tostring(L, lua_upvalueindex(1));
const auto& [workspaceID, workspaceName, isAutoID] = getWorkspaceIDNameFromString("special:" + name);
@@ -1266,6 +1275,7 @@ void Internal::registerDispatcherBindings(lua_State* L) {
Internal::setFn(L, "force_renderer_reload", hlForceRendererReload);
Internal::setFn(L, "force_idle", hlForceIdle);
Internal::setFn(L, "focus", hlFocus);
+ Internal::setFn(L, "no_op", hlNoop);
}
lua_setfield(L, -2, "dsp");