mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -04:00
(Haiku) Port new clipboard behavior to Haiku
Former-commit-id: 3a40559cf39475a0291187a4853c1e5f335b96f0 Former-commit-id: 95bfec78129d9d22afb16a33775df8d3abb24fa1
This commit is contained in:
+2
-1
@@ -560,7 +560,8 @@ def copy_data():
|
||||
# Haiku clipboard detection
|
||||
elif uname()[0] == 'Haiku':
|
||||
run(('clipboard', '-c', _copy_subject))
|
||||
Popen('sleep 30; clipboard -r', shell=True)
|
||||
Popen(f"sleep 30; test \'{_hash.hexdigest() + 2 * ' ' + '-'}\' = \"$(printf \"$(clipboard -p)\" | sha512sum)\" "
|
||||
"&& clipboard -r", shell=True)
|
||||
# MacOS clipboard detection
|
||||
elif uname()[0] == 'Darwin':
|
||||
run('pbcopy', stdin=Popen(('printf', _copy_subject.replace('\\', '\\\\').replace('%', '%%')), stdout=PIPE)
|
||||
|
||||
@@ -19,7 +19,8 @@ if len(arguments) > 0:
|
||||
Popen("sleep 30; printf '' | pbcopy", shell=True)"""
|
||||
elif arguments[0] == 'HAIKU':
|
||||
replacement = """run(('clipboard', '-c', _copy_subject))
|
||||
Popen('sleep 30; clipboard -r', shell=True)"""
|
||||
Popen(f"sleep 30; test \\'{_hash.hexdigest() + 2 * ' ' + '-'}\\' = \\"$(printf \\"$(clipboard -p)\\" | sha512sum)\\" "
|
||||
"&& clipboard -r", shell=True)"""
|
||||
elif arguments[0] == 'TERMUX':
|
||||
replacement = """run(('termux-clipboard-set', _copy_subject))
|
||||
Popen(f"sleep 30; test \\'{_hash.hexdigest() + 2 * ' ' + '-'}\\' = \\"$(printf \\"$(termux-clipboard-get)\\" | "
|
||||
|
||||
Reference in New Issue
Block a user