mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-02 23:27:17 -04:00
Fixed new clipboard clear behavior on FreeBSD
Former-commit-id: e276182b11c518bc7b880eaebb7d9c8fd528761b Former-commit-id: fc1f067c5c0df86109795feca05527be5322d829
This commit is contained in:
+2
-2
@@ -574,8 +574,8 @@ def copy_data():
|
|||||||
elif 'DISPLAY' in environ:
|
elif 'DISPLAY' in environ:
|
||||||
run(('xclip', '-sel', 'c'), stdin=Popen(('printf', _copy_subject.replace('\\', '\\\\')
|
run(('xclip', '-sel', 'c'), stdin=Popen(('printf', _copy_subject.replace('\\', '\\\\')
|
||||||
.replace('%', '%%')), stdout=PIPE).stdout)
|
.replace('%', '%%')), stdout=PIPE).stdout)
|
||||||
Popen(f"sleep 30; test \'{_hash.hexdigest() + 2*' ' + '-'}\' = \"$(printf \"$(xclip -o -sel c)\" | sha512sum)\" "
|
Popen(f"sleep 30; test \'{_hash.hexdigest() + 2*' ' + '-'}\' = \"$(printf \"$(xclip -o -sel c)\" | sha512sum)\""
|
||||||
"&& xclip -i /dev/null -sel c", shell=True)
|
" && xclip -i /dev/null -sel c", shell=True)
|
||||||
else:
|
else:
|
||||||
print('\n\u001b[38;5;9merror: clipboard tool could not be determined\n\nnote that the clipboard does not '
|
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')
|
'function in a raw tty\u001b[0m\n')
|
||||||
|
|||||||
+1
-1
@@ -388,7 +388,7 @@ printf "/usr/bin/sshyp
|
|||||||
cp lib/* port-jobs/working/
|
cp lib/* port-jobs/working/
|
||||||
cd port-jobs
|
cd port-jobs
|
||||||
./CLIPTOOL.py LINUX
|
./CLIPTOOL.py LINUX
|
||||||
./CLIPBOARD.py LINUX
|
./CLIPBOARD.py BSD
|
||||||
./UNAME.py TMP
|
./UNAME.py TMP
|
||||||
./COMMENTS.py ALL
|
./COMMENTS.py ALL
|
||||||
./BLANKS.py
|
./BLANKS.py
|
||||||
|
|||||||
@@ -34,6 +34,17 @@ if len(arguments) > 0:
|
|||||||
.replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')), stdout=PIPE).stdout)
|
.replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')), stdout=PIPE).stdout)
|
||||||
Popen(f"sleep 30; test \\'{_hash.hexdigest() + 2*' ' + '-'}\\' = \\"$(printf \\"$(xclip -o -sel c)\\" | sha512sum)\\" "
|
Popen(f"sleep 30; test \\'{_hash.hexdigest() + 2*' ' + '-'}\\' = \\"$(printf \\"$(xclip -o -sel c)\\" | sha512sum)\\" "
|
||||||
"&& xclip -i /dev/null -sel c", shell=True)"""
|
"&& xclip -i /dev/null -sel c", shell=True)"""
|
||||||
|
elif arguments[0] == 'BSD':
|
||||||
|
replacement = """if 'WAYLAND_DISPLAY' in environ:
|
||||||
|
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)
|
||||||
|
else:
|
||||||
|
run(('xclip', '-sel', 'c'), stdin=Popen(('printf', _copy_subject
|
||||||
|
.replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')), stdout=PIPE).stdout)
|
||||||
|
Popen(f"sleep 30; test \\'{_hash.hexdigest()}\\' = \\"$(printf \\"$(xclip -o -sel c)\\" | sha512sum)\\" "
|
||||||
|
"&& xclip -i /dev/null -sel c", shell=True)"""
|
||||||
else:
|
else:
|
||||||
s_exit()
|
s_exit()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user