Fixed clipboard contents leaking through process list on Wayland

Former-commit-id: bb1485fec2d891af9f49b4d8e81df72b0e6160d9
Former-commit-id: 2eff4ace8b82735a890bf1e669d92d7abbb59dfa
This commit is contained in:
2023-09-24 18:56:42 -04:00
parent e8267f838a
commit 5af02866b4
2 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -22,7 +22,8 @@ if len(arguments) > 0:
Popen("sleep 30; termux-clipboard-set ''", shell=True)"""
elif arguments[0] == 'LINUX':
replacement = """if 'WAYLAND_DISPLAY' in environ:
run(('wl-copy', _copy_subject))
run('wl-copy', stdin=Popen(('printf', _copy_subject
.replace('\\\\\\', '\\\\\\\\\\\\\\').replace('%', '%%')), stdout=PIPE).stdout)
Popen('sleep 30; wl-copy -c', shell=True)
else:
run(('xclip', '-sel', 'c'), stdin=Popen(('printf', _copy_subject