mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-06 09:07:13 -04:00
Fixed clipboard tool detection on Wayland, various fixes related to curses menu
Former-commit-id: b021ed0871fb2e099ea82701378ca0876e8f594f Former-commit-id: 21707287d99f03268c1f05eda6ab875c22272c27
This commit is contained in:
@@ -14,13 +14,13 @@ if len(arguments) > 0:
|
||||
regex = re.compile(f"{string1}.*?{string2}", re.DOTALL)
|
||||
replacement = """# check for clipboard tool and display warning if missing
|
||||
if 'WAYLAND_DISPLAY' in environ:
|
||||
_display_server, _clipboard_tool = 'Wayland', 'wl-clipboard'
|
||||
_display_server, _clipboard_tool, _clipboard_package = 'Wayland', 'wl-copy', 'wl-clipboard'
|
||||
else:
|
||||
_display_server, _clipboard_tool = 'X11', 'xclip'
|
||||
_display_server, _clipboard_tool, _clipboard_package = 'X11', 'xclip', 'xclip'
|
||||
from shutil import which
|
||||
if which(_clipboard_tool) is None:
|
||||
print(f'''\u001b[38;5;9mwarning: you are using {_display_server} and "{_clipboard_tool}" is not present -
|
||||
copying entry fields will not function until "{_clipboard_tool}" is installed\u001b[0m
|
||||
copying entry fields will not function until "{_clipboard_package}" is installed\u001b[0m
|
||||
''')"""
|
||||
else:
|
||||
regex = re.compile(f"{string1}.*?{string2}\n\n", re.DOTALL)
|
||||
|
||||
Reference in New Issue
Block a user