mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 12:56:28 -04:00
(Termux) Port new clipboard clear behavior to Termux
Former-commit-id: bdda7fae8c2305e1f64c468d45c205d12645f669 Former-commit-id: e6fea38cc85a03b8970f0cdf61390825cc048c20
This commit is contained in:
+2
-1
@@ -569,7 +569,8 @@ def copy_data():
|
||||
# Termux (Android) clipboard detection
|
||||
elif isdir("/data/data/com.termux"):
|
||||
run(('termux-clipboard-set', _copy_subject))
|
||||
Popen("sleep 30; termux-clipboard-set ''", shell=True)
|
||||
Popen(f"sleep 30; test \'{_hash.hexdigest() + 2 * ' ' + '-'}\' = \"$(printf \"$(termux-clipboard-get)\" | "
|
||||
f"sha512sum)\" && termux-clipboard-set ''", shell=True)
|
||||
# X11 clipboard detection
|
||||
elif 'DISPLAY' in environ:
|
||||
run(('xclip', '-sel', 'c'), stdin=Popen(('printf', _copy_subject.replace('\\', '\\\\')
|
||||
|
||||
Reference in New Issue
Block a user