Fixed new clipboard clear behavior on FreeBSD

Former-commit-id: e276182b11c518bc7b880eaebb7d9c8fd528761b
Former-commit-id: fc1f067c5c0df86109795feca05527be5322d829
This commit is contained in:
2023-09-26 19:03:07 -04:00
parent 30afbafcbf
commit eb4fae3e9e
3 changed files with 14 additions and 3 deletions
+2 -2
View File
@@ -574,8 +574,8 @@ def copy_data():
elif 'DISPLAY' in environ:
run(('xclip', '-sel', 'c'), stdin=Popen(('printf', _copy_subject.replace('\\', '\\\\')
.replace('%', '%%')), stdout=PIPE).stdout)
Popen(f"sleep 30; test \'{_hash.hexdigest() + 2*' ' + '-'}\' = \"$(printf \"$(xclip -o -sel c)\" | sha512sum)\" "
"&& xclip -i /dev/null -sel c", shell=True)
Popen(f"sleep 30; test \'{_hash.hexdigest() + 2*' ' + '-'}\' = \"$(printf \"$(xclip -o -sel c)\" | sha512sum)\""
" && xclip -i /dev/null -sel c", shell=True)
else:
print('\n\u001b[38;5;9merror: clipboard tool could not be determined\n\nnote that the clipboard does not '
'function in a raw tty\u001b[0m\n')