This commit is contained in:
2025-05-31 03:32:58 -04:00
parent ef678f31fd
commit e830931ff4
41 changed files with 253 additions and 268 deletions

View File

@ -1,5 +1,4 @@
local misc = require("core.misc")
local map = misc.map
local map = core.misc.map
-- vim binds
vim.g.mapleader = " " -- set leader key
@ -25,20 +24,20 @@ map("n", "<leader>x", function() -- execute order 111
local perm = vim.fn.getfperm(fn)
if string.match(perm, "x", 3) then
vim.notify("Removed executable flags", vim.log.levels.INFO, {
title = misc.appid
title = core.misc.appid
})
vim.fn.setfperm(fn, string.sub(fn, 1, 2).."-"..string.sub(fn, 4, 5).."-"
..string.sub(fn, 7, 8).."-")
else
vim.notify("Add executable flags", vim.log.levels.INFO, {
title = misc.appid
title = core.misc.appid
})
vim.fn.setfperm(fn, string.sub(fn, 1, 2).."x"..string.sub(fn, 4, 5).."x"
..string.sub(fn, 7, 8).."x")
end
else
vim.notify("File doesn't exist", vim.log.levels.INFO, {
title = misc.appid
title = core.misc.appid
})
end
end, { desc = "toggle executable flag of the file" })