Closed mielouk closed 4 years ago
Thought of a way to allow more customization and handle any bash program for any OS. Can you try version 2.2 attached and let me know,
There is now settings in the script. Simply open the script with any text editor, and change mac_copy = 'pbcopy' to the wl-clipboard copy command mac_paste = 'pbpaste' to the wl-clipboard paste command they could be something like 'wl-copy' 'wl-paste'
Let me know if it works for you ^ ^
local linux_copy = 'wl-copy' --copy command that will be used in Linux. OR write a different command
local linux_paste = 'wl-paste' --paste command that will be used in Linux. OR write a different command
Works great! Thank you!
I got another question somewhat related to this, but I'm not sure whether I should open another issue. Is it possible to add the mouse middle click as a key binding to paste the content of the clipboard? How should additional lines look like?
mp.add_key_binding('ctrl+v', 'paste', paste)
mp.add_key_binding('ctrl+V', 'pasteCaps', paste)
Glad that it works :) As for your question, if I remember correctly mouse middle click is MOUSE_BTN1 in mpv. Under Keybindig settings of the script, for MAC OS, you should see:
mp.add_key_binding('Meta+v', 'paste', paste)
mp.add_key_binding('Meta+V', 'pasteCaps', paste)
You can add an additional line
mp.add_key_binding('MOUSE_BTN1', 'pasteMouse', paste)
If it didn't work, let me know so I double check ^ ^
It works quite well. Thx!
I use Arch btw ;)
As xclip is X11 only, I wondered if you could substitute it with wl-clipboard to enable those scripts under Wayland.