#!/bin/bash set -euo pipefail source "$(dirname "${BASH_SOURCE[0]}")/../lib/logging.sh" log "Installing COSMIC desktop..." sudo pacman -S --noconfirm --needed \ cosmic \ pipewire wireplumber pipewire-alsa pipewire-jack pipewire-pulse \ networkmanager \ bluez bluez-utils \ flatpak log "Enabling services..." # cosmic-greeter is COSMIC's own display manager; fall back to sddm if absent if pacman -Qi cosmic-greeter &>/dev/null; then sudo systemctl enable cosmic-greeter.service else sudo pacman -S --noconfirm --needed sddm sudo systemctl enable sddm.service fi sudo systemctl enable NetworkManager.service sudo systemctl enable bluetooth.service log "COSMIC installation complete. Reboot to start."