From fe54acd3b039f4f4172d3dead26e27a5e19c3c79 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 25 May 2023 14:33:08 -0400 Subject: [PATCH] Fixed clipboard tool warning showing on platforms where it is irrelevant, such as Termux and WSL Former-commit-id: d979f20a0d6d24bcbe59773d6cb0d0654c06443c Former-commit-id: b3168f92e537ec49d8b28e9e2fe8389672ae7ad7 --- lib/stweak.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/stweak.py b/lib/stweak.py index 84eab80..e580a97 100644 --- a/lib/stweak.py +++ b/lib/stweak.py @@ -353,7 +353,8 @@ def initial_setup(): # PORT START CLIPTOOL # check for clipboard tool and display warning if missing - if uname()[0] in ('Linux', 'FreeBSD'): + if uname()[0] in ('Linux', 'FreeBSD') and not 'WSL_DISTRO_NAME' in environ \ + and not exists("/data/data/com.termux"): _display_server = None if 'WAYLAND_DISPLAY' in environ: _display_server, _clipboard_tool, _clipboard_package = 'Wayland', 'wl-copy', 'wl-clipboard'