Files
omarchy_setup/modules/hyprland-config.sh
google-labs-jules[bot] ae8e3c3c40 Feat: Improve Keyring UX and Icon Manager Flow (#7)
* feat: add dev tools, AI aliases, and improve zshrc documentation

This commit introduces several new features and improvements:

- **Adds Development Tools to `apps.sh`:** The `apps.sh` module now installs essential development tools, including `python`, `pip`, `nodejs`, `npm`, `uv`, and `nvm`.

- **Implements `.zshrc.local` for Private Variables:**
  - A `.zshrc.local.example` file has been added to serve as a template for users to securely store their private environment variables, such as API keys.
  - The main `.zshrc` file now sources `.zshrc.local` if it exists.

- **Adds AI Aliases to `.zshrc`:** A new section has been added to `.zshrc` with example aliases for interacting with command-line AI tools.

- **Improves `.zshrc` Documentation:** The `.zshrc` file has been thoroughly documented with comments in Spanish, explaining the purpose of each section. The title has also been updated and professionalized.

- **Fixes a Regression:** This commit restores the `ytm`, `ytv`, `ytls`, and SSH agent functions in `.zshrc` that were accidentally removed in a previous step.

* feat: improve keyring UX and icon manager flow

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.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Marco Gallegos <marco.gallegos@outlook.com>
2025-11-19 08:48:17 -06:00

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