#!/usr/bin/env bash set -euo pipefail PLUGIN_ID="com.vini.dancingcharacter" INSTALL_DIR="$HOME/.local/share/plasma/wallpapers/$PLUGIN_ID" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" echo "==> Installing Dancing Character wallpaper plugin..." # Clean previous install rm -rf "$INSTALL_DIR" mkdir -p "$INSTALL_DIR" # Copy plugin files cp -r "$SCRIPT_DIR/plugin/." "$INSTALL_DIR/" echo "==> Plugin installed at: $INSTALL_DIR" echo "" echo "==> Checking Plasma version..." PLASMA_VER=$(plasmashell --version 2>/dev/null | grep -oP '\d+\.\d+' | head -1 || echo "unknown") echo " Plasma: $PLASMA_VER" # Check if QtWebEngine is available (needed by the plugin) if ! python3 -c "import subprocess; r=subprocess.run(['qmake6','-query','QT_INSTALL_PLUGINS'],capture_output=True,text=True); p=r.stdout.strip(); import os; found=os.path.exists(p+'/webenginecore') or os.path.exists(p+'/QtWebEngineCore'); exit(0 if found else 1)" 2>/dev/null; then echo "" echo "[!] Could not verify QtWebEngine. If the wallpaper shows a blank screen, install it:" echo " sudo apt install qml6-module-qtwebengine" fi echo "" echo "==> Done! Plugin installed. No need to restart Plasma." echo "" echo " To activate the wallpaper:" echo " Right-click the desktop → Configure Desktop and Wallpaper..." echo " → Wallpaper Type → Dancing Character → Apply"