1
0
Fork 0
.dotfiles/.config/mpv/scripts/paste.lua
2024-05-30 19:32:09 +01:00

10 lines
280 B
Lua

mp = require 'mp'
function paste()
local pasted = mp.command_native{
name = 'subprocess',
args = 'wl-paste',
capture_stdout = true,
}
mp.commandv('loadfile', pasted.stdout:match('^%s*(.-)%s*$'))
end
mp.add_key_binding('Ctrl+v', 'paste', paste)