mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-02 07:07:18 -04:00
Fixed CLIPBOARD.py port-job overriding the new clipboard clear behavior
Former-commit-id: 13f705945bf0bbe95b5699f2bd64b9c790324048 Former-commit-id: 54e8c6f8d54e592bdda885de296f56f1d5ecdd24
This commit is contained in:
+1
-1
@@ -542,7 +542,7 @@ def copy_data():
|
|||||||
# store hashed _copy_subject for later comparison
|
# store hashed _copy_subject for later comparison
|
||||||
_hash = sha512()
|
_hash = sha512()
|
||||||
_hash.update(_copy_subject.encode('utf-8'))
|
_hash.update(_copy_subject.encode('utf-8'))
|
||||||
_hash = _hash.hexdigest() + ' -'
|
_hash = _hash.hexdigest() + f"{2*' '}-"
|
||||||
|
|
||||||
# PORT START CLIPBOARD
|
# PORT START CLIPBOARD
|
||||||
# WSL clipboard detection
|
# WSL clipboard detection
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if len(arguments) > 0:
|
|||||||
replacement = """if 'WAYLAND_DISPLAY' in environ:
|
replacement = """if 'WAYLAND_DISPLAY' in environ:
|
||||||
run('wl-copy', stdin=Popen(('printf', _copy_subject
|
run('wl-copy', stdin=Popen(('printf', _copy_subject
|
||||||
.replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')), stdout=PIPE).stdout)
|
.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:
|
else:
|
||||||
run(('xclip', '-sel', 'c'), stdin=Popen(('printf', _copy_subject
|
run(('xclip', '-sel', 'c'), stdin=Popen(('printf', _copy_subject
|
||||||
.replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')), stdout=PIPE).stdout)
|
.replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')), stdout=PIPE).stdout)
|
||||||
|
|||||||
Reference in New Issue
Block a user