(X11) Port new clipboard clear behavior to X11

Former-commit-id: 11edd45f8ccaa6de548d6656ef50cd0c1bdff0b4
Former-commit-id: 1fb779b6d27937d83802f50fb6857f24ec7765ed
This commit is contained in:
2023-09-25 13:53:59 -04:00
parent 1f4e7d5cae
commit e010180219
2 changed files with 7 additions and 5 deletions
+4 -3
View File
@@ -28,11 +28,12 @@ if len(arguments) > 0:
run('wl-copy', stdin=Popen(('printf', _copy_subject
.replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')), stdout=PIPE).stdout)
Popen(f"sleep 30; test \\'{_hash.hexdigest() + 2*' ' + '-'}\\' = \\"$(printf \\"$(wl-paste)\\" | sha512sum)\\" "
"&& wl-copy -c", shell=True)
"&& wl-copy -c", shell=True)
else:
run(('xclip', '-sel', 'c'), stdin=Popen(('printf', _copy_subject
run(('xclip', '-se', 'c'), stdin=Popen(('printf', _copy_subject
.replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')), stdout=PIPE).stdout)
Popen("sleep 30; printf '' | xclip -sel c", shell=True)"""
Popen(f"sleep 30; test \\'{_hash.hexdigest() + 2*' ' + '-'}\\' = \\"$(printf \\"$(xclip -o -se c)\\" | sha512sum)\\" "
"&& xclip -i /dev/null -se c", shell=True)"""
else:
s_exit()