Compare commits

...

2 Commits

Author SHA1 Message Date
ef092bd4a6 fix: sddm als letztes Modul ausführen
systemctl enable sddm --now kann sofort zu SDDM wechseln und das
Script vorzeitig beenden. sddm ist jetzt das letzte Modul in
FRESH_MODULES und DEFAULT_MODULES, nach post/apply-theme.
2026-05-27 22:40:17 +02:00
d8e7635b9f feat: paru auto-install + ASCII Header + Continue-Prompt
- paru wird jetzt in detect_environment() auf frischen Systemen installiert
  (vorher nur in preflight, das bei --fresh nie durchlief)
- install_aur_helper() von preflight nach utils.sh verschoben (global verfügbar)
- Header von Cherokee-Zeichen ('Ꮎ Ꮇ Ꭼ Ꮢ Ꮎ Ꮑ') auf ASCII ('O M E R O N')
  umgestellt — Cherokee zeigte auf manchen Terminals Fragezeichen
- Continue with installation? Prompt nach Banner als erster interaktiver Schritt
- basic mode header jetzt sauberes ASCII (===== statt Box-Zeichen)
2026-05-27 22:38:06 +02:00
4 changed files with 56 additions and 50 deletions

View File

@@ -23,8 +23,8 @@ DEFAULT_MODULES=(
"core/services" "core/services"
"homelab/setup" "homelab/setup"
"optional/install" "optional/install"
"core/sddm"
"post/apply-theme" "post/apply-theme"
"core/sddm"
) )
FRESH_MODULES=( FRESH_MODULES=(
@@ -33,8 +33,8 @@ FRESH_MODULES=(
"core/services" "core/services"
"homelab/setup" "homelab/setup"
"optional/install" "optional/install"
"core/sddm"
"post/apply-theme" "post/apply-theme"
"core/sddm"
) )
RUN_MODULES=() RUN_MODULES=()
@@ -99,7 +99,7 @@ detect_environment() {
if ((!OMERON_HAS_GUM)) && have pacman; then if ((!OMERON_HAS_GUM)) && have pacman; then
printf '\033[1;36m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m\n' printf '\033[1;36m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m\n'
printf '\033[1;36m Ꮎ Ꮑ — Modular System Setup Framework\033[0m\n' printf '\033[1;36m O M E R O N — Modular System Setup Framework\033[0m\n'
printf '\033[1;36m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m\n' printf '\033[1;36m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m\n'
printf '\n' printf '\n'
printf ' \033[1;33mgum is not installed.\033[0m Installing it enables the full TUI experience.\n' printf ' \033[1;33mgum is not installed.\033[0m Installing it enables the full TUI experience.\n'
@@ -125,8 +125,13 @@ detect_environment() {
fi fi
fi fi
if ((OMERON_FRESH_INSTALL)) && ((!OMERON_HAS_GUM)) && have pacman; then if ((OMERON_FRESH_INSTALL)); then
tui_install_gum 2>/dev/null || true if ((!OMERON_HAS_GUM)) && have pacman; then
tui_install_gum 2>/dev/null || true
fi
if ! have paru && ! have yay; then
install_aur_helper
fi
fi fi
} }
@@ -203,14 +208,10 @@ collect_all_interactive() {
} }
show_banner() { show_banner() {
tui_header " Ꮎ Ꮑ " tui_header "O M E R O N — Modular System Setup"
tui_info "Modular System Setup Framework"
tui_info "Arch / Hyprland / CachyOS"
printf '\n' printf '\n'
if ((OMERON_FRESH_INSTALL)); then if ((OMERON_FRESH_INSTALL)); then
tui_warn "FRESH INSTALL MODE" tui_info "Fresh install: Hyprland + GPU drivers + all dependencies"
tui_info "Will install Hyprland, GPU drivers, and all dependencies."
printf '\n' printf '\n'
fi fi
} }
@@ -230,6 +231,14 @@ main() {
show_banner show_banner
tui_separator
printf '\n'
if ! tui_confirm "Continue with installation"; then
tui_info "Installation cancelled."
exit 0
fi
printf '\n'
local modules_to_run=() local modules_to_run=()
if ((${#RUN_MODULES[@]})); then if ((${#RUN_MODULES[@]})); then
mapfile -t modules_to_run < <(collect_modules) mapfile -t modules_to_run < <(collect_modules)
@@ -268,7 +277,7 @@ main() {
done done
printf '\n' printf '\n'
tui_header " Ꮎ Ꮑ " tui_header "O M E R O N — Done"
tui_success "Installation Complete!" tui_success "Installation Complete!"
printf '\n' printf '\n'
tui_info "Log: ${OMERON_LOG_FILE}" tui_info "Log: ${OMERON_LOG_FILE}"

View File

@@ -187,20 +187,17 @@ tui_spin() {
tui_header() { tui_header() {
local title="$(_strip_format "$1")" local title="$(_strip_format "$1")"
local len="${#title}"
if [[ "$OMERON_TUI_MODE" == "gum" ]]; then if [[ "$OMERON_TUI_MODE" == "gum" ]]; then
gum style --foreground 212 --border-foreground 212 --border double --align center --width 60 --margin "1 2" --padding "1 2" "$title" gum style --foreground 212 --border-foreground 212 --border double --align center --width 60 --margin "1 2" --padding "1 2" "$title"
else else
local width=50 local width=50
local pad=$(( (width - len) / 2 ))
[[ $pad -lt 2 ]] && pad=2
local line local line
printf -v line '%*s' "$width" '' && line="${line// /}" printf -v line '%*s' "$width" '' && line="${line// /#}"
line="${line//#/=}"
printf '\n' printf '\n'
printf '\033[1;36m%s\033[0m\n' "$line" printf '\033[1;36m%s\033[0m\n' "$line"
printf '\033[1;36m║\033[0m%*s%s%*s\033[1;36m║\033[0m\n' $pad '' "$title" $((width - pad - len)) '' printf '\033[1;36m %s\033[0m\n' "$title"
printf '\033[1;36m%s\033[0m\n' "$line" printf '\033[1;36m%s\033[0m\n' "$line"
printf '\n' printf '\n'
fi fi

View File

@@ -261,3 +261,35 @@ system_summary() {
└─────────────────────────────────────────────┘ └─────────────────────────────────────────────┘
SUMMARY SUMMARY
} }
install_aur_helper() {
if have paru || have yay; then
return 0
fi
if ! command -v git >/dev/null 2>&1; then
sudo_run pacman -S --needed --noconfirm git base-devel
fi
local build_dir
build_dir="$(mktemp -d)"
sudo_run pacman -S --needed --noconfirm rustup 2>/dev/null || true
if have rustup; then
rustup default stable >/dev/null 2>&1 || true
fi
if git clone https://aur.archlinux.org/paru.git "$build_dir/paru" 2>/dev/null; then
(cd "$build_dir/paru" && makepkg -si --needed --noconfirm) 2>&1 | tail -5 || {
tui_warn "paru build failed, trying yay..."
if git clone https://aur.archlinux.org/yay.git "$build_dir/yay" 2>/dev/null; then
(cd "$build_dir/yay" && makepkg -si --needed --noconfirm) 2>&1 | tail -5 || {
tui_warn "yay build failed too. Install manually: paru -S paru-bin"
}
fi
}
fi
rm -rf "$build_dir"
}

View File

@@ -54,7 +54,6 @@ module_main() {
fi fi
if ! have paru && ! have yay; then if ! have paru && ! have yay; then
tui_info "No AUR helper found. Installing paru..."
install_aur_helper install_aur_helper
fi fi
@@ -69,35 +68,4 @@ module_main() {
fi fi
} }
install_aur_helper() {
if have paru || have yay; then
return 0
fi
if ! command -v git >/dev/null 2>&1; then
sudo_run pacman -S --needed --noconfirm git base-devel
fi
local build_dir
build_dir="$(mktemp -d)"
tui_info "Building paru from AUR..."
sudo_run pacman -S --needed --noconfirm rustup 2>/dev/null || true
if have rustup; then
rustup default stable >/dev/null 2>&1 || true
fi
if git clone https://aur.archlinux.org/paru.git "$build_dir/paru" 2>/dev/null; then
(cd "$build_dir/paru" && makepkg -si --needed --noconfirm) 2>&1 | tail -5 || {
tui_warn "paru build failed, trying yay..."
if git clone https://aur.archlinux.org/yay.git "$build_dir/yay" 2>/dev/null; then
(cd "$build_dir/yay" && makepkg -si --needed --noconfirm) 2>&1 | tail -5 || {
tui_warn "yay build failed too. Install manually: paru -S paru-bin"
}
fi
}
fi
rm -rf "$build_dir"
}