Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- copy to ~/.config/mpv/scripts/subclip.lua
- local function subtext(name, data)
- if data == nil then
- return
- end
- local file = io.open("/tmp/subclip.txt", "w");
- file:write(data);
- file:close();
- os.execute("xclip -selection clipboard /tmp/subclip.txt")
- end
- mp.observe_property("sub-text", "string", subtext)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement