mirror of
https://github.com/mintycube/dotfiles.git
synced 2024-10-22 12:05:41 +00: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" }, {
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||||
pattern = vim.fn.resolve(vim.fn.expand(path)),
|
pattern = vim.fn.resolve(vim.fn.expand(path)),
|
||||||
callback = function()
|
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,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
recompile("~/.config/suckless/dwm/config.h")
|
recompile("~/.config/suckless/dwm/config.h")
|
||||||
recompile("~/.config/suckless/dmenu/config.h")
|
recompile("~/.config/suckless/dmenu/config.h")
|
||||||
recompile("~/.config/suckless/st/config.h")
|
recompile("~/.config/suckless/st/config.h")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user