Added keybinds for options for Yazi opener
This commit is contained in:
parent
e42cb28ffc
commit
fb16f8aa70
5 changed files with 106 additions and 42 deletions
|
|
@ -8,11 +8,24 @@ return {
|
|||
return
|
||||
end
|
||||
|
||||
if #args > 0 and args[1] == "detatch" then
|
||||
os.execute(string.format("opener detatch \"%s\"", h.url))
|
||||
else
|
||||
if #args == 0 then
|
||||
ya.manager_emit("open", {})
|
||||
end
|
||||
|
||||
if args[1] == "detatch" then
|
||||
os.execute(string.format("opener detatch \"%s\"", h.url))
|
||||
elseif args[1] == "list" then
|
||||
local f = assert(io.popen(string.format(
|
||||
"opener list \"%s\"", h.url), 'r'))
|
||||
local out = assert(f:read('*a'))
|
||||
f:close()
|
||||
ya.notify {
|
||||
title = string.format("Openers for %s:", h.name),
|
||||
content = out,
|
||||
timeout = 6.5,
|
||||
level = "info",
|
||||
}
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue