diff --git a/docs/TODO.md b/docs/TODO.md index a7f0aea..f8f1636 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -2,6 +2,8 @@ These are in rough order of my priority, though no promises I do them in this order. +- [ ] Check pointer position and only warp if not on focused window already +- [ ] Change focus direction when closing window - [ ] Use set_xcursor_theme request - [ ] Add focused window title to bar - [ ] Support overriding config location diff --git a/src/Config.zig b/src/Config.zig index 6f1d6ba..b6521a0 100644 --- a/src/Config.zig +++ b/src/Config.zig @@ -92,13 +92,7 @@ pub fn create() !*Config { log.err("Error while loading config: {s}. Continuing with default config", .{@errorName(err)}); // Free any partially-loaded state and reset to defaults for (config.keybinds.values()) |cmd| { - switch (cmd) { - .spawn => |argv| { - for (argv) |arg| utils.gpa.free(arg); - utils.gpa.free(argv); - }, - else => {}, - } + cmd.deinit(); } config.keybinds.clearAndFree(utils.gpa); config.tag_binds.clearAndFree(utils.gpa);