From ad7a1f15b32ff678518a42efd88d73204a96c7ee Mon Sep 17 00:00:00 2001 From: rootiest Date: Sat, 9 May 2026 00:57:42 -0400 Subject: [PATCH] fix(deps): dynamic clipboard label and yellow check for xclip-only in --check-deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Show only the binary(s) actually present in the clipboard row label, and use a yellow ✔ (instead of green) when only xclip is found so the degraded state stands out from a fully-satisfied check. --- color-tool | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/color-tool b/color-tool index 1960a95..f533787 100755 --- a/color-tool +++ b/color-tool @@ -585,9 +585,15 @@ check_deps() { _check "python3-pyqt6" "python3 -c 'import PyQt6.QtDBus' 2>/dev/null" "KDE color picker interface" 0 _check "jq" "command -v jq >/dev/null" "JSON output and data parsing" 1 _check "curl" "command -v curl >/dev/null" "Fetching color names from API" 0 - _check "wl-clipboard / xclip" "command -v wl-copy >/dev/null || command -v xclip >/dev/null" "System clipboard integration" 0 - if ! command -v wl-copy >/dev/null 2>&1 && command -v xclip >/dev/null 2>&1; then + if command -v wl-copy >/dev/null 2>&1 && command -v xclip >/dev/null 2>&1; then + printf " ${GREEN}✔${RESET} %-25s ${DIM}%s${RESET}\n" "wl-clipboard / xclip" "System clipboard integration" + elif command -v wl-copy >/dev/null 2>&1; then + printf " ${GREEN}✔${RESET} %-25s ${DIM}%s${RESET}\n" "wl-clipboard" "System clipboard integration" + elif command -v xclip >/dev/null 2>&1; then + printf " ${YELLOW}✔${RESET} %-25s ${DIM}%s${RESET}\n" "xclip" "System clipboard integration" printf " ${YELLOW} └─ xclip found but wl-clipboard is missing — xclip operates through XWayland and may be unreliable on Wayland${RESET}\n" + else + printf " ${YELLOW}⚠${RESET} %-25s ${DIM}%s${RESET}\n" "wl-clipboard / xclip" "System clipboard integration" fi _check "libnotify" "command -v notify-send >/dev/null" "Desktop notifications" 0 _check "ImageMagick" "command -v magick >/dev/null || command -v convert >/dev/null" "Color swatches in notifications" 0