mirror of
https://github.com/marcogll/omarchy_setup.git
synced 2026-01-13 13:25:16 +00:00
This commit introduces two main improvements to the user experience:
1. **Refactors the Icon Manager for Non-Interactive Installation:**
- The `icon_manager.sh` module can now be run in a non-interactive mode.
- The "Install All" process has been updated to use this non-interactive mode, which installs the default icon theme without pausing the script or requiring user input.
2. **Improves the GNOME Keyring Workflow:**
- The script no longer errors out if the GNOME Keyring agent is not immediately available after installation.
- Instead, a clear summary message is now displayed at the end of the "Install All" process, instructing the user to log out and back in, and then run the SSH key synchronization module separately. This provides a much smoother and more intuitive user experience.
56 lines
2.1 KiB
Bash
Executable File
56 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# ===============================================================
|
|
# hyprland-config.sh - Instala la configuración personalizada de Hyprland
|
|
# ===============================================================
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
source "${SCRIPT_DIR}/common.sh"
|
|
|
|
# Cargar el gestor de iconos para usar sus funciones
|
|
source "${SCRIPT_DIR}/icon_manager.sh"
|
|
|
|
run_module_main() {
|
|
log_step "Instalación de Configuración de Hyprland"
|
|
|
|
# --- 1. Copiar archivos de configuración ---
|
|
# La configuración de Hyprland debe estar en una carpeta 'hypr_config' en la raíz del repo
|
|
local source_dir="${SCRIPT_DIR}/../hypr_config"
|
|
local dest_dir="$HOME/.config/hypr"
|
|
|
|
if [[ ! -d "$source_dir" ]]; then
|
|
log_error "No se encontró el directorio de configuración 'hypr_config' en la raíz del repositorio."
|
|
log_info "Asegúrate de que la carpeta con tu configuración se llame 'hypr_config'."
|
|
return 1
|
|
fi
|
|
|
|
# Crear copia de seguridad si ya existe una configuración
|
|
if [[ -d "$dest_dir" ]]; then
|
|
local backup_dir="${dest_dir}.bak_$(date +%F_%T)"
|
|
log_warning "Configuración de Hyprland existente encontrada."
|
|
log_info "Creando copia de seguridad en: ${backup_dir}"
|
|
if mv "$dest_dir" "$backup_dir"; then
|
|
log_success "Copia de seguridad creada."
|
|
else
|
|
log_error "No se pudo crear la copia de seguridad. Abortando."
|
|
return 1
|
|
fi
|
|
fi
|
|
|
|
log_info "Copiando la configuración de Hyprland a ${dest_dir}..."
|
|
# Usamos rsync para una copia eficiente
|
|
rsync -a --info=progress2 "$source_dir/" "$dest_dir/"
|
|
|
|
# --- 2. Establecer el tema de iconos por defecto ---
|
|
log_info "Estableciendo el tema de iconos por defecto (Tela Nord)..."
|
|
# Llamamos a la función específica de icon_manager.sh
|
|
set_default_icon_theme
|
|
|
|
log_success "Configuración de Hyprland instalada correctamente."
|
|
log_warning "Por favor, cierra sesión y vuelve a iniciarla para aplicar los cambios."
|
|
return 0
|
|
}
|
|
|
|
# Ejecutar si se llama directamente
|
|
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
|
run_module_main "$@"
|
|
fi |