10 lines
280 B
Lua
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)
|