Fixed CLIPBOARD.py port-job overriding the new clipboard clear behavior

Former-commit-id: 13f705945bf0bbe95b5699f2bd64b9c790324048
Former-commit-id: 54e8c6f8d54e592bdda885de296f56f1d5ecdd24
This commit is contained in:
2023-09-24 22:04:00 -04:00
parent 5a4e952d4d
commit aa0bd017c9
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -542,7 +542,7 @@ def copy_data():
# store hashed _copy_subject for later comparison
_hash = sha512()
_hash.update(_copy_subject.encode('utf-8'))
_hash = _hash.hexdigest() + ' -'
_hash = _hash.hexdigest() + f"{2*' '}-"
# PORT START CLIPBOARD
# WSL clipboard detection
+1 -1
View File
@@ -24,7 +24,7 @@ if len(arguments) > 0:
replacement = """if 'WAYLAND_DISPLAY' in environ:
run('wl-copy', stdin=Popen(('printf', _copy_subject
.replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')), stdout=PIPE).stdout)
Popen('sleep 30; wl-copy -c', shell=True)
Popen(f"sleep 30; test \\'{_hash}\\' = \\"$(printf \\"$(wl-paste)\\" | sha512sum)\\" && wl-copy -c", shell=True)
else:
run(('xclip', '-sel', 'c'), stdin=Popen(('printf', _copy_subject
.replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')), stdout=PIPE).stdout)