Updated Hypr, Yazi

This commit is contained in:
2025-10-17 02:05:03 +02:00
parent e20f8b6ea2
commit 7cd7d746e7
141 changed files with 133 additions and 8479 deletions

View File

@@ -0,0 +1,39 @@
local temp_dir = os.getenv("TEMP") or os.getenv("TMP") or "/tmp"
local file_name = temp_dir .. "/bookmark.yazi"
local save_bookmark = ya.sync(function(state, idx)
local folder = tostring(cx.active.current.cwd)
local file = io.open(file_name, "w")
if file then
file:write(folder)
file:close()
ya.notify { title = "Saved Bookmark", content = folder, timeout = 3, level = "info" }
end
end)
local jump_bookmark = ya.sync(function(state, idx)
local file = io.open(file_name, "r")
if file then
local line = file:read("*line")
file:close()
ya.manager_emit("cd", { line })
ya.manager_emit("arrow", { -99999999 })
end
end)
return {
entry = function(_, job)
local action = job.args[1]
if not action then
return
end
if action == "save" then
save_bookmark()
elseif action == "jump" then
jump_bookmark()
end
end
}