💾 Archived View for ait.place › dot › mpv › scripts › yank.lua.txt captured on 2022-07-16 at 13:54:35.
-=-=-=-=-=-=-
function yankpath() local uri = mp.get_property("path") local pipe = io.popen("xclip -i -selection c", "w") pipe:write(uri) pipe:close() mp.osd_message("Path yanked to clipboard") end function yankstreampath() local uri = mp.get_property("stream-path") local pipe = io.popen("xclip -i -selection c", "w") pipe:write(uri) pipe:close() mp.osd_message("Stream-path yanked to clipboard") end mp.add_key_binding(nil, "yank-path", yankpath) mp.add_key_binding(nil, "yank-streampath", yankstreampath)