key bind for list of delete marks

https://github.com/zenyd/mpv-scripts/issues/14
This commit is contained in:
bitingsock 2021-03-05 14:52:47 -08:00 committed by GitHub
parent 019fb5346c
commit c8bd7c057c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -36,5 +36,18 @@ function delete()
end
end
function list_marks()
local delString = "Delete Marks:\n"
for _,v in pairs(del_list) do
if v:find("\\") then
delString = delString..v:match("\\([^\\]*)$").."\n"
else
delString = delString..v:match("/([^/]*)$").."\n"
end
end
mp.osd_message(delString)
end
mp.add_key_binding("ctrl+DEL", "delete_file", mark_delete)
mp.add_key_binding("alt+DEL", "list_marks", list_marks, {repeatable=true})
mp.register_event("shutdown", delete)