#!/usr/bin/env bash # Installs Kadence's launcher entry and icon for the current user. # # The app itself runs straight from the checkout (`python3 -m kadence_desktop`) # or from a pip install; this just makes it appear in the application menu with # a proper icon and the right-click actions. set -euo pipefail HERE="$(dirname "$(readlink -f "$0")")" APPS="${XDG_DATA_HOME:-$HOME/.local/share}/applications" ICONS="${XDG_DATA_HOME:-$HOME/.local/share}/icons/hicolor/scalable/apps" BIN="${HOME}/.local/bin" mkdir -p "$APPS" "$ICONS" "$BIN" # A launcher that works whether or not the package is pip-installed. cat > "$BIN/kadence-desktop" < "$SITE_PTH/kadence-desktop.pth" install -m 0644 "$HERE/kadence.desktop" "$APPS/kadence.desktop" install -m 0644 "$HERE/kadence.svg" "$ICONS/kadence.svg" command -v update-desktop-database >/dev/null && update-desktop-database "$APPS" || true command -v gtk-update-icon-cache >/dev/null && gtk-update-icon-cache -f -t "${XDG_DATA_HOME:-$HOME/.local/share}/icons/hicolor" 2>/dev/null || true echo "Installed. Launch it from the menu, or run: kadence-desktop" echo "Make sure ~/.local/bin is on your PATH."