From 8eb76c60fa442266a9ffec109980d7c849190450 Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Sun, 25 May 2025 01:38:53 +0200 Subject: [PATCH] update package installation script --- executable_install-fedora.sh | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/executable_install-fedora.sh b/executable_install-fedora.sh index e9f0c60..ee93d48 100755 --- a/executable_install-fedora.sh +++ b/executable_install-fedora.sh @@ -66,9 +66,33 @@ sudo dnf install -y \ docker-ce docker-ce-cli containerd.io \ docker-buildx-plugin docker-compose-plugin -hyprpm update -hyprpm add https://github.com/hyprwm/hyprland-plugins -hyprpm enable hyprexpo +hyprpm_update_plugin() { + local REPO_URL="$1" + local PLUGIN_NAME="$2" + + # Repository-Prüfung mit stderr-Umleitung + if ! hyprpm list 2>/dev/null | grep -q "$REPO_URL"; then + echo "Füge Repository hinzu..." + if ! hyprpm add "$REPO_URL" 2>/dev/null; then + echo "⚠️ Repository konnte nicht hinzugefügt (existiert bereits?)" + fi + fi + + # Plugin-Installation mit stderr/sdout-Silencing + echo "Installiere $PLUGIN_NAME..." + hyprpm install "$PLUGIN_NAME" >/dev/null 2>&1 || echo "ℹ️ Plugin bereits installiert" + + # Aktivierung und Neustart + hyprpm enable "$PLUGIN_NAME" && { + echo "✅ $PLUGIN_NAME aktiviert" + hyprpm reload + } +} + +# Funktionsaufruf mit Parametern +hyprpm_update_plugin \ + "https://github.com/hyprwm/hyprland-plugins" \ + "hyprexpo" ## VSCodium sudo rpmkeys --import https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg