лучше не лезьте
This commit is contained in:
@@ -41,3 +41,7 @@ setup {
|
||||
-- Available values: ui.Border.PLAIN, ui.Border.ROUNDED
|
||||
type = ui.Border.ROUNDED,
|
||||
}
|
||||
|
||||
require("archivemount"):setup()
|
||||
require("chmod")
|
||||
require("starship").setup()
|
||||
|
||||
21
yazi/keymap.toml
Normal file
21
yazi/keymap.toml
Normal file
@@ -0,0 +1,21 @@
|
||||
[[manager.prepend_keymap]]
|
||||
on = "<C-n>"
|
||||
run = '''
|
||||
shell 'dragon -x -i -T "$1"' --confirm
|
||||
'''
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = "y"
|
||||
run = [ '''
|
||||
shell 'echo "$@" | xclip -i -selection clipboard -t text/uri-list' --confirm
|
||||
''', "yank" ]
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "m", "a" ]
|
||||
run = "plugin archivemount --args=mount"
|
||||
desc = "Mount selected archive"
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "m", "u" ]
|
||||
run = "plugin archivemount --args=unmount"
|
||||
desc = "Unmount and save changes to original archive"
|
||||
1
yazi/plugins/archivemount.yazi
Submodule
1
yazi/plugins/archivemount.yazi
Submodule
Submodule yazi/plugins/archivemount.yazi added at 354a4d6df9
39
yazi/plugins/chmod.yazi/init.lua
Normal file
39
yazi/plugins/chmod.yazi/init.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
local selected_or_hovered = ya.sync(function()
|
||||
local tab, paths = cx.active, {}
|
||||
for _, u in pairs(tab.selected) do
|
||||
paths[#paths + 1] = tostring(u)
|
||||
end
|
||||
if #paths == 0 and tab.current.hovered then
|
||||
paths[1] = tostring(tab.current.hovered.url)
|
||||
end
|
||||
return paths
|
||||
end)
|
||||
|
||||
return {
|
||||
entry = function()
|
||||
ya.manager_emit("escape", { visual = true })
|
||||
|
||||
local urls = selected_or_hovered()
|
||||
if #urls == 0 then
|
||||
return ya.notify { title = "Chmod", content = "No file selected", level = "warn", timeout = 5 }
|
||||
end
|
||||
|
||||
local value, event = ya.input {
|
||||
title = "Chmod:",
|
||||
position = { "top-center", y = 3, w = 40 },
|
||||
}
|
||||
if event ~= 1 then
|
||||
return
|
||||
end
|
||||
|
||||
local status, err = Command("chmod"):arg(value):args(urls):spawn():wait()
|
||||
if not status or not status.success then
|
||||
ya.notify {
|
||||
title = "Chmod",
|
||||
content = string.format("Chmod with selected files failed, exit code %s", status and status.code or err),
|
||||
level = "error",
|
||||
timeout = 5,
|
||||
}
|
||||
end
|
||||
end,
|
||||
}
|
||||
1
yazi/plugins/starship.yazi
Submodule
1
yazi/plugins/starship.yazi
Submodule
Submodule yazi/plugins/starship.yazi added at 20d5a4d454
@@ -2,5 +2,4 @@
|
||||
show_hidden = true
|
||||
|
||||
[preview]
|
||||
image_uality = 90
|
||||
|
||||
image_quality = 70
|
||||
|
||||
Reference in New Issue
Block a user