refactor: only install missing packages in sound and hyprland modules

This commit is contained in:
Martin Büchler 2025-08-14 23:01:21 +02:00
parent 0c014eb08d
commit e6ff6f6c48
2 changed files with 27 additions and 3 deletions

View File

@ -14,7 +14,20 @@ SOUND_PACKAGES=(
sof-firmware 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 # Enable and start PipeWire services
systemctl --user enable --now pipewire pipewire-pulse wireplumber systemctl --user enable --now pipewire pipewire-pulse wireplumber

View File

@ -21,6 +21,17 @@ HYPR_PACKAGES=(
noto-fonts-emoji 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