From faefbbf94d5d17ea96e6f731a70265f887816c1f Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Tue, 1 Jul 2025 10:56:11 +0200 Subject: [PATCH] revert changes --- dot_config/hypr/programs.conf.tmpl | 11 +------ executable_install-fedora.sh | 52 ++++++++++++++++++++++-------- 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/dot_config/hypr/programs.conf.tmpl b/dot_config/hypr/programs.conf.tmpl index 9b6d0be..033786d 100644 --- a/dot_config/hypr/programs.conf.tmpl +++ b/dot_config/hypr/programs.conf.tmpl @@ -21,6 +21,7 @@ exec-once = nm-applet & exec-once = blueman-applet & exec-once = swaync & exec-once = waybar & hyprpaper +exec-once = hyprpm reload -n exec-once = [workspace 2 silent] firefox exec-once = hypridle exec-once = [workspace 3 silent] codium @@ -35,16 +36,6 @@ exec-once = [workspace 6 silent] outlook-for-linux exec-once = [workspace 6 silent] thunderbird {{- end }} -{{- if and (eq .chezmoi.os "linux") (eq .chezmoi.arch "amd64") }} -# If you are installing hycov with hyprpm, you should comment out this -# hyprexpo only run on amd64 systems -plugin = {{ .chezmoi.homeDir }}/repos/hyprland-plugins/hyprexpo/build/libhyprexpo.so - -# If you are installing hycov by manually compile , you should comment out this -#exec-once = hyprpm reload -n - -{{- end }} - # Bitwarden Window Floating exec-once = ~/.config/hypr/scripts/bitwarden.sh diff --git a/executable_install-fedora.sh b/executable_install-fedora.sh index df6a893..e1973be 100644 --- a/executable_install-fedora.sh +++ b/executable_install-fedora.sh @@ -66,6 +66,44 @@ sudo dnf install -y \ docker-ce docker-ce-cli containerd.io \ docker-buildx-plugin docker-compose-plugin +hyprpm_update_plugin() { + local REPO_URL="$1" + local PLUGINS="$2" + local REPO_NAME="${REPO_URL##*/}" + IFS=',' read -ra PLUGINS_ARRAY <<< "$PLUGINS" + + # Repository-Prüfung mit tr + if ! hyprpm list 2>/dev/null | tr -dc '[[:print:]\n]' | grep -q "$REPO_NAME"; 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-Verarbeitung mit tr und angepasstem Grep + for PLUGIN in "${PLUGINS_ARRAY[@]}"; do + # Bereinige Ausgabe und prüfe Status + if hyprpm list | tr -dc '[[:print:]\n]' | grep -A1 "Plugin $PLUGIN" | grep -q "enabled:.*true"; then + echo "ℹ️ $PLUGIN ist bereits aktiviert" + else + echo "Aktiviere $PLUGIN..." + if hyprpm enable "$PLUGIN" 2>/dev/null; then + echo "✅ $PLUGIN erfolgreich aktiviert" + hyprpm reload + else + echo "❌ Fehler bei der Aktivierung von $PLUGIN" + fi + fi + done +} + +## Hyprland Plugins +hyprpm update +### Funktionsaufruf mit mehreren Plugins +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 if [ ! -e /etc/yum.repos.d/vscodium.repo ]; then @@ -126,20 +164,6 @@ else echo "dotool ist bereits installiert, überspringe Download" fi -# hyprexpo mit Prüfung -if [[ ! -f ${HOME}/repos/hyprland-plugins/hyprexpo/build/libhyprexpo.so ]]; then - mkdir -p ${HOME}/repos - cd ${HOME}/repos - git clone https://github.com/hyprwm/hyprland-plugins - cd hyprland-plugins/hyprexpo - cmake -B build - cmake --build build - cd - echo "hyprexpo wurde auf dem System installiert" -else - echo "hyprexpo ist bereits installiert, überspringe Download" -fi - # Paketname wie im RPM: meist outlook-for-linux PACKAGE="outlook-for-linux"