oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git

Fixed keychords for complex spawns

Commit
c489ba5e2cae1b7c98ce23c6ddd54b8c2e03e972
Parent
b84bff4
Author
tonybanters <tonybanters@gmail.com>
Date
2026-02-17 16:44:14

Diff

diff --git a/src/config/lua.zig b/src/config/lua.zig
index 924e013..13f1bf8 100644
--- a/src/config/lua.zig
+++ b/src/config/lua.zig
@@ -478,9 +478,11 @@ fn lua_key_chord(state: ?*c.lua_State) callconv(.c) c_int {
         keybind.int_arg = @intCast(c.lua_tointegerx(s, -1, null));
     } else if (c.lua_type(s, -1) == c.LUA_TSTRING) {
         keybind.str_arg = get_lua_string(s, -1);
+    } else if (c.lua_type(s, -1) == c.LUA_TTABLE) {
+        keybind.str_arg = extract_spawn_command(s, -1);
     }
-    c.lua_settop(s, -2);
 
+    c.lua_settop(s, -2);
     cfg.add_keybind(keybind) catch return 0;
 
     return 0;