Here is the snippet from that plugin that does the work:
Code:
def CopyToClipboard(self, txt):
"""
Puts the text in txt on the clipboard
Based on code from:
https://www.programcreek.com/python/?CodeExample=copy+to+clipboard
"""
if platform.system() == 'Darwin':
command = ["pbcopy"]
elif platform.system() == 'Windows':
command=["clip"]
elif platform.system() == "Linux":
command = ["xsel", "-b", "-i"]
Are you by chance using wayland instead of X11 on your linux box? If so, and if there is a wayland equivalent you could use instead, you might need to tweak these lines. From a google search I think wl-copy and or wl-clipboard might do what you want on wayland.
FWIW, wayland is not yet a choice I would make. Everytime I try it things break sometimes in horrible fashion. If I need to get real work done, turning off wayland on boot is the first thing I do. It is normally okay for playing around but not quite there yet.
Worse yet wayland's implementation varies by desktop chosen (kde vs ...) and so is non-standardized.
Quote:
Originally Posted by philja
...
Looking at my OS clipboard, the plugin doesn't write anything there when I use the COPY function. I haven't been able to understand what I need to do to get it working. Help, please.
|