diff --git a/modules/05-sound.sh b/modules/05-sound.sh index dc463c1..8279fff 100755 --- a/modules/05-sound.sh +++ b/modules/05-sound.sh @@ -14,7 +14,20 @@ SOUND_PACKAGES=( sof-firmware ) -paru -S --needed --noconfirm "${SOUND_PACKAGES[@]}" +to_install=() +for pkg in "${SOUND_PACKAGES[@]}"; do + if ! paru -Q "$pkg" &>/dev/null; then + to_install+=("$pkg") + fi + +done + +if [ "${#to_install[@]}" -gt 0 ]; then + paru -S --noconfirm "${to_install[@]}" + echo "Sound packages installed." +else + echo "All sound packages already installed." +fi # Enable and start PipeWire services systemctl --user enable --now pipewire pipewire-pulse wireplumber diff --git a/modules/06-hyprland.sh b/modules/06-hyprland.sh index 81d2df4..e01e2d0 100755 --- a/modules/06-hyprland.sh +++ b/modules/06-hyprland.sh @@ -21,6 +21,17 @@ HYPR_PACKAGES=( noto-fonts-emoji ) -paru -S --needed --noconfirm "${HYPR_PACKAGES[@]}" +to_install=() +for pkg in "${HYPR_PACKAGES[@]}"; do + if ! paru -Q "$pkg" &>/dev/null; then + to_install+=("$pkg") + fi -echo "Hyprland and related tools installed and configured." +done + +if [ "${#to_install[@]}" -gt 0 ]; then + paru -S --noconfirm "${to_install[@]}" + echo "Hyprland and related tools installed and configured." +else + echo "All Hyprland and related tools already installed." +fi