mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -04:00
Fixed xclip throwing errors on FreeBSD
Former-commit-id: 65b466c0598f2194d452c0897ffa9eeb7ec3b281 Former-commit-id: 51ad92728be141113047bb25fb8841d141d545e6
This commit is contained in:
+3
-3
@@ -572,10 +572,10 @@ def copy_data():
|
||||
Popen("sleep 30; termux-clipboard-set ''", shell=True)
|
||||
# X11 clipboard detection
|
||||
elif 'DISPLAY' in environ:
|
||||
run(('xclip', '-se', 'c'), stdin=Popen(('printf', _copy_subject.replace('\\', '\\\\')
|
||||
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 -se c)\" | sha512sum)\" "
|
||||
"&& xclip -i /dev/null -se 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')
|
||||
|
||||
@@ -30,10 +30,10 @@ if len(arguments) > 0:
|
||||
Popen(f"sleep 30; test \\'{_hash.hexdigest() + 2*' ' + '-'}\\' = \\"$(printf \\"$(wl-paste)\\" | sha512sum)\\" "
|
||||
"&& wl-copy -c", shell=True)
|
||||
else:
|
||||
run(('xclip', '-se', 'c'), stdin=Popen(('printf', _copy_subject
|
||||
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 -se c)\\" | sha512sum)\\" "
|
||||
"&& xclip -i /dev/null -se 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:
|
||||
s_exit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user