mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-29 13:26:30 -04:00
Added WSL clipboard support
Former-commit-id: 0d365e6ec00549a9578e7adc4330a89cc8b5dabd Former-commit-id: 8a3fe31f06f92e4298dd21521b84500f3ca48734
This commit is contained in:
+4
-1
@@ -697,7 +697,10 @@ def copy_data(): # copies a specified field of an entry to the clipboard
|
||||
_index = 2
|
||||
elif arguments[2] in ('note', '-n'):
|
||||
_index = 3
|
||||
if 'WAYLAND_DISPLAY' in environ: # Wayland clipboard detection
|
||||
if 'WSL_DISTRO_NAME' in environ: # WSL clipboard detection
|
||||
run(['pwsh.exe', '-c', 'Set-Clipboard', _copy_line[_index].rstrip()])
|
||||
Popen("sleep 30; pwsh.exe -c 'echo \"\" | Set-Clipboard'", shell=True)
|
||||
elif 'WAYLAND_DISPLAY' in environ: # Wayland clipboard detection
|
||||
run(['wl-copy', _copy_line[_index].rstrip()])
|
||||
Popen('sleep 30; wl-copy -c', shell=True)
|
||||
elif uname()[0] == 'Haiku': # Haiku clipboard detection
|
||||
|
||||
Reference in New Issue
Block a user