#!/usr/bin/env bash module_description() { printf "SDDM Theme - install custom login theme\n" } module_required() { return 1; } module_should_skip() { if have sddm; then return 1 fi return 0 } module_prereqs() { if ! have sddm; then log_warn "SDDM is not installed. Install with: sudo pacman -S sddm" return 1 fi } module_main() { log_section "SDDM Theme Installation" local sddm_theme_dir="$OMERON_PROJECT_DIR/dotfiles/hypr/sddm-theme" if [[ ! -d "$sddm_theme_dir/pascal-hypr" ]]; then log_warn "SDDM theme not found at $sddm_theme_dir" return 1 fi log_info "Installing SDDM theme..." sudo_run mkdir -p /usr/share/sddm/themes /etc/sddm.conf.d if [[ -d "/usr/share/sddm/themes/pascal-hypr" ]]; then sudo_run rm -rf "/usr/share/sddm/themes/pascal-hypr" fi sudo_run cp -a "$sddm_theme_dir/pascal-hypr" /usr/share/sddm/themes/ if [[ -f "$sddm_theme_dir/sddm.conf" ]]; then sudo_run cp -a "$sddm_theme_dir/sddm.conf" /etc/sddm.conf.d/10-pascal-hypr.conf fi log_success "SDDM theme installed" if tui_confirm "Enable SDDM as display manager?"; then sudo_run systemctl enable sddm --now 2>/dev/null || log_warn "Could not enable SDDM" fi }