mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 16:47:14 -04:00
Clear X11 clipboard with 'printf', rather than the less standard 'echo -n'
Former-commit-id: d6f994d9b0edd9aa333dcb76c34a15c26a3631b2 Former-commit-id: ad5858bbdcafec5be890e801938a0fb8f6df8a9c
This commit is contained in:
+2
-2
@@ -710,8 +710,8 @@ def copy_data(): # copies a specified field of an entry to the clipboard
|
|||||||
run(['termux-clipboard-set', _copy_line[_index].rstrip()])
|
run(['termux-clipboard-set', _copy_line[_index].rstrip()])
|
||||||
Popen("sleep 30; termux-clipboard-set ''", shell=True)
|
Popen("sleep 30; termux-clipboard-set ''", shell=True)
|
||||||
else: # X11 clipboard detection
|
else: # X11 clipboard detection
|
||||||
run(['xclip', '-sel', 'c'], stdin=Popen(['echo', '-n', _copy_line[_index].rstrip()], stdout=PIPE).stdout)
|
run(['xclip', '-sel', 'c'], stdin=Popen(['printf', _copy_line[_index].rstrip()], stdout=PIPE).stdout)
|
||||||
Popen("sleep 30; echo -n '' | xclip -sel c", shell=True)
|
Popen("sleep 30; printf '' | xclip -sel c", shell=True)
|
||||||
rmtree(f"{tmp_dir}{_shm_folder}")
|
rmtree(f"{tmp_dir}{_shm_folder}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user