- Modular installer with gum-based TUI - Fresh-install detection with auto GPU driver selection - Preflight module for system detection (Intel/AMD/NVIDIA) - Core modules: packages, dotfiles, services, SDDM - Optional software installer (Obsidian, Neovim, VS Code, etc.) - Homelab config module with dynamic AGS integration - Two complete themes: Forest Neon and Rose Night - 19 Hyprland control scripts + 4 AGS widgets - Idempotent dotfile deployment with automatic backup - YAML-based configuration, extensible module system - Full logging to ~/.local/share/omeron/
61 lines
1.7 KiB
Bash
Executable File
61 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
module_description() {
|
|
printf "Apply Theme - set default Hyprland theme and restart services\n"
|
|
}
|
|
|
|
module_required() { return 1; }
|
|
module_should_skip() { return 1; }
|
|
|
|
module_prereqs() {
|
|
if ! have hyprctl && ! have notify-send; then
|
|
log_warn "Neither hyprctl nor notify-send found. Theme can still be applied later."
|
|
return 0
|
|
fi
|
|
}
|
|
|
|
module_main() {
|
|
log_section "Theme Application"
|
|
|
|
local theme_script="$HOME/.config/hypr/Scripts/theme-menu.sh"
|
|
local themes_dir="$HOME/.config/hypr/Themes"
|
|
|
|
if [[ ! -f "$theme_script" ]]; then
|
|
log_warn "Theme script not found (dotfiles may not be deployed yet)"
|
|
return 1
|
|
fi
|
|
|
|
local default_theme="${OMERON_DEFAULT_THEME:-forest-neon}"
|
|
|
|
local theme_file=""
|
|
if [[ -f "$themes_dir/$default_theme.theme" ]]; then
|
|
theme_file="$themes_dir/$default_theme.theme"
|
|
elif [[ -f "$themes_dir/forest-neon.theme" ]]; then
|
|
theme_file="$themes_dir/forest-neon.theme"
|
|
elif [[ -f "$themes_dir/rose-night.theme" ]]; then
|
|
theme_file="$themes_dir/rose-night.theme"
|
|
else
|
|
local available
|
|
available="$(find "$themes_dir" -name '*.theme' -type f | head -1)"
|
|
if [[ -n "$available" ]]; then
|
|
theme_file="$available"
|
|
fi
|
|
fi
|
|
|
|
if [[ -z "$theme_file" ]]; then
|
|
log_warn "No theme files found in $themes_dir"
|
|
return 1
|
|
fi
|
|
|
|
if tui_confirm "Apply theme: $(basename "$theme_file" .theme).theme?"; then
|
|
log_info "Applying theme: $(basename "$theme_file")"
|
|
tui_spin "Applying theme..." bash "$theme_script" --apply "$theme_file"
|
|
|
|
if have notify-send; then
|
|
notify-send "Omeron" "Theme applied: $(basename "$theme_file" .theme)" >/dev/null 2>&1 || true
|
|
fi
|
|
|
|
log_success "Theme applied: $(basename "$theme_file" .theme)"
|
|
fi
|
|
}
|