Silence pywal warnings and add dependency management to install.sh

This commit is contained in:
2026-04-20 13:11:19 -04:00
parent 99eb1be04c
commit 15680ecfec
2 changed files with 26 additions and 1 deletions
+25
View File
@@ -95,6 +95,31 @@ backup_and_copy() {
fi fi
} }
install_dependencies() {
echo "=== Checking Dependencies ==="
local deps_needed=()
if ! command -v wal &> /dev/null; then
deps_needed+=("python-pywal")
fi
if ! command -v magick &> /dev/null && ! command -v convert &> /dev/null; then
deps_needed+=("imagemagick")
fi
if [ ${#deps_needed[@]} -gt 0 ]; then
echo "Installing missing dependencies: ${deps_needed[*]}"
if command -v sudo &> /dev/null; then
sudo pacman -S --needed --noconfirm "${deps_needed[@]}"
else
echo "Warning: sudo not found. Please install manually: ${deps_needed[*]}"
fi
else
echo "All dependencies are installed."
fi
echo ""
}
install_dependencies
echo "=== Checking for local changes ===" echo "=== Checking for local changes ==="
echo "" echo ""
+1 -1
View File
@@ -26,7 +26,7 @@ else
fi fi
echo "Extracting colors using Pywal..." echo "Extracting colors using Pywal..."
wal -i "$IMAGE_PATH" -n -q wal -i "$IMAGE_PATH" -n -q 2> >(grep -v "deprecated in IMv7" >&2)
# Clear old backgrounds and copy the new one into the dynamic theme # Clear old backgrounds and copy the new one into the dynamic theme
rm -f "$THEME_DIR/backgrounds/"* rm -f "$THEME_DIR/backgrounds/"*