diff --git a/port-jobs/CLIPBOARD.py b/port-jobs/CLIPBOARD.py index bf033a3..d5a7967 100755 --- a/port-jobs/CLIPBOARD.py +++ b/port-jobs/CLIPBOARD.py @@ -25,10 +25,10 @@ if len(arguments) > 0: .replace('%', '%%')], stdout=PIPE).stdout) Popen("sleep 30; printf '' | xclip -sel c", shell=True)""" elif arguments[0] == 'LINUX': - replacement = """if 'WAYLAND_DISPLAY' in environ: # Wayland clipboard detection + replacement = """if 'WAYLAND_DISPLAY' in environ: run(['wl-copy', _copy_line[_index].rstrip()]) Popen('sleep 30; wl-copy -c', shell=True) - else: # X11 clipboard detection + else: run(['xclip', '-sel', 'c'], stdin=Popen(['printf', _copy_line[_index].rstrip().replace('\\\\\\', '\\\\\\\\\\\\\\') .replace('%', '%%')], stdout=PIPE).stdout) Popen("sleep 30; printf '' | xclip -sel c", shell=True)"""