mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-01 14:47:17 -04:00
Improved detection of and errors relating to clipboard support in raw ttys
Former-commit-id: 7b13af57872ff2bd2bf8285608b5d9a206c84fe8 Former-commit-id: 4406cd49234ff58cf568a55d07757f373830fe91
This commit is contained in:
+3
-2
@@ -345,11 +345,12 @@ def initial_setup():
|
||||
# PORT START CLIPTOOL
|
||||
# check for clipboard tool and display warning if missing
|
||||
if uname()[0] in ('Linux', 'FreeBSD'):
|
||||
_display_server = None
|
||||
if 'WAYLAND_DISPLAY' in environ:
|
||||
_display_server, _clipboard_tool, _clipboard_package = 'Wayland', 'wl-copy', 'wl-clipboard'
|
||||
else:
|
||||
elif 'DISPLAY' in environ:
|
||||
_display_server, _clipboard_tool, _clipboard_package = 'X11', 'xclip', 'xclip'
|
||||
if which(_clipboard_tool) is None:
|
||||
if _display_server is not None and which(_clipboard_tool) is None:
|
||||
print(f'\n\u001b[38;5;9mwarning: you are using {_display_server} and "{_clipboard_tool}" is not '
|
||||
f'present - \ncopying entry fields will not function until '
|
||||
f'"{_clipboard_package}" is installed\u001b[0m')
|
||||
|
||||
Reference in New Issue
Block a user