mirror of
https://github.com/mintycube/dotfiles.git
synced 2024-10-22 14:05:41 +02:00
Fix autocompilation of suckless software
This commit is contained in:
parent
ecb9b45a3d
commit
819e8661c3
@ -80,10 +80,13 @@ local function recompile(path)
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
pattern = vim.fn.resolve(vim.fn.expand(path)),
|
||||
callback = function()
|
||||
vim.cmd("!sudo make install; renew-dwm")
|
||||
local dir = vim.fn.fnamemodify(path, ":h")
|
||||
local shell_cmd = string.format("cd %s && sudo make install && renew-dwm", dir)
|
||||
vim.cmd("!" .. shell_cmd)
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
recompile("~/.config/suckless/dwm/config.h")
|
||||
recompile("~/.config/suckless/dmenu/config.h")
|
||||
recompile("~/.config/suckless/st/config.h")
|
||||
|
Loading…
Reference in New Issue
Block a user