From 9fe56e32c1d958467b434b54e98c5b6788988676 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sat, 21 Jun 2025 22:53:40 +0900 Subject: modified core/autocmds.lua --- ar/.config/TheSiahxyz/lua/TheSiahxyz/core/autocmds.lua | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'ar') diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/core/autocmds.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/core/autocmds.lua index 2fbff6c..6f13f63 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/core/autocmds.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/core/autocmds.lua @@ -357,17 +357,12 @@ autocmd("BufWritePost", { local suckless_keys = augroup("suckless_keys") autocmd("BufWritePost", { group = suckless_keys, - pattern = home .. "/.local/src/suckless/dwm/config.def.h", + pattern = { home .. "/.local/src/suckless/dwm/config.def.h", home .. "/.local/src/suckless/st/config.def.h" }, callback = function() - vim.cmd("silent !" .. home .. "/.local/bin/extractkeys") - end, -}) - -autocmd("BufWritePost", { - group = suckless_keys, - pattern = home .. "/.local/src/suckless/st/config.def.h", - callback = function() - vim.cmd("silent !" .. home .. "/.local/bin/extractkeys") + local choice = vim.fn.confirm("Extract key bindings?", "&Yes\n&No", 2) + if choice == 1 then + vim.cmd("silent !" .. home .. "/.local/bin/extractkeys") + end end, }) -- cgit v1.2.3