Fixed keychords for complex spawns
Browse files
+3 −1 src/config/lua.zig
| @@ -478,9 +478,11 @@ fn lua_key_chord(state: ?*c.lua_State) callconv(.c) c_int { | |||
| 478 | keybind.int_arg = @intCast(c.lua_tointegerx(s, -1, null)); | 478 | keybind.int_arg = @intCast(c.lua_tointegerx(s, -1, null)); |
| 479 | } else if (c.lua_type(s, -1) == c.LUA_TSTRING) { | 479 | } else if (c.lua_type(s, -1) == c.LUA_TSTRING) { |
| 480 | keybind.str_arg = get_lua_string(s, -1); | 480 | keybind.str_arg = get_lua_string(s, -1); |
| 481 | + } else if (c.lua_type(s, -1) == c.LUA_TTABLE) { | ||
| 482 | + keybind.str_arg = extract_spawn_command(s, -1); | ||
| 481 | } | 483 | } |
| 482 | - c.lua_settop(s, -2); | ||
| 483 | 484 | ||
| 485 | + c.lua_settop(s, -2); | ||
| 484 | cfg.add_keybind(keybind) catch return 0; | 486 | cfg.add_keybind(keybind) catch return 0; |
| 485 | 487 | ||
| 486 | return 0; | 488 | return 0; |