mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-29 21:36:31 -04:00
Fixed errors when clearing clipboard on Windows (WSL)
Former-commit-id: 92b8baf923cccd20cd22cf6322c30ba1a0729cec Former-commit-id: 8ef2d4f2fe2e3e91b820b0e0577a7fc5bd9b90ca
This commit is contained in:
+1
-1
@@ -650,7 +650,7 @@ def copy_data():
|
||||
# WSL clipboard detection
|
||||
if 'WSL_DISTRO_NAME' in environ:
|
||||
run(('powershell.exe', '-c', "Set-Clipboard '" + _copy_line[_index].replace("'", "''") + "'"))
|
||||
Popen("sleep 30; powershell.exe -c 'echo \"\" | Set-Clipboard'", shell=True)
|
||||
Popen("sleep 30; powershell.exe -c Set-Clipboard ''", shell=True, stdout=DEVNULL, stderr=DEVNULL)
|
||||
# Wayland clipboard detection
|
||||
elif 'WAYLAND_DISPLAY' in environ:
|
||||
run(('wl-copy', _copy_line[_index]))
|
||||
|
||||
Reference in New Issue
Block a user