3 Commits

Author SHA1 Message Date
rootiest c206d78ce7 Merge pull request 'feat: XDG Base Directory compliance, --uninstall flag, and xclip advisory' (#13) from feat/xdg-compliance-and-uninstall into main
Reviewed-on: #13
2026-05-09 05:02:15 +00:00
rootiest 1a27dbde4e fix(tests): redirect stdin from /dev/null in uninstall test to prevent hang
Test PR / test (pull_request) Successful in 6s
Auto Label PRs / label (pull_request) Successful in 3s
Release on Merge / release (pull_request) Successful in 7s
--uninstall prompts for config removal when stdin is a TTY. Running the
test from an interactive terminal caused it to block on read. Feeding
/dev/null forces the non-interactive path without changing behaviour.
2026-05-09 01:00:31 -04:00
rootiest ad7a1f15b3 fix(deps): dynamic clipboard label and yellow check for xclip-only in --check-deps
Test PR / test (pull_request) Successful in 6s
Auto Label PRs / label (pull_request) Successful in 2s
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.
2026-05-09 00:57:42 -04:00
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -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
+1 -1
View File
@@ -259,7 +259,7 @@ fi
# 16. Uninstall — removes installed files, config is kept in non-interactive mode
it "uninstalls installed files (keeps config)"
uninstall_out=$("$COLOR_TOOL" --uninstall 2>&1)
uninstall_out=$("$COLOR_TOOL" --uninstall </dev/null 2>&1)
if [[ ! -e "$HOME/.local/bin/color-tool" ]] &&
[[ ! -L "$HOME/.local/bin/color-tool" ]] &&
[[ ! -d "$XDG_DATA_HOME/color-tool" ]] &&