ajustes de optimizacion

This commit is contained in:
Marco Gallegos
2025-11-15 02:07:44 +00:00
parent 7213738ae0
commit c620db69c2
8 changed files with 621 additions and 411 deletions

View File

@@ -24,48 +24,58 @@ install_homebrew() {
fi
}
install_apps() {
run_module_main() {
log_step "Instalación de Aplicaciones"
# Paquetes base esenciales
# --- Definición de Paquetes ---
local PACMAN_BASE=(
git curl wget base-devel unzip neofetch htop fastfetch btop
vim nano tmux xdg-utils xdg-user-dirs stow
)
local PACMAN_MULTIMEDIA=(
vlc vlc-plugins-all libdvdcss audacity inkscape
ffmpeg gstreamer gst-plugins-good gst-plugins-bad gst-plugins-ugly
yt-dlp
)
local PACMAN_NETWORK=(
filezilla telegram-desktop scrcpy
)
local PACMAN_INTEL_GFX=(
mesa vulkan-intel lib32-mesa lib32-vulkan-intel
)
local PACMAN_INTEL_VIDEO=(
intel-media-driver libva-utils libvdpau-va-gl libva-mesa-driver
)
local PACMAN_OPENCL=(
ocl-icd libclc clinfo
)
local AUR_PACKAGES=(
"visual-studio-code-bin" "cursor-bin" "keyd" "fragments"
"logiops" "ltunify" "teamviewer" "intel-compute-runtime"
)
log_info "Instalando herramientas base..."
sudo pacman -S --noconfirm --needed \
git curl wget base-devel unzip \
neofetch htop fastfetch btop \
vim nano tmux \
xdg-utils xdg-user-dirs stow || {
sudo pacman -S --noconfirm --needed "${PACMAN_BASE[@]}" || {
log_error "Error al instalar herramientas base"
return 1
}
# Instalar Homebrew
install_homebrew
# Aplicaciones multimedia
log_info "Instalando aplicaciones multimedia..."
sudo pacman -S --noconfirm --needed \
vlc vlc-plugins-all libdvdcss \
audacity inkscape \
ffmpeg gstreamer gst-plugins-good gst-plugins-bad gst-plugins-ugly \
yt-dlp || {
sudo pacman -S --noconfirm --needed "${PACMAN_MULTIMEDIA[@]}" || {
log_warning "Algunos paquetes multimedia no se pudieron instalar"
}
# Configurar VLC como reproductor predeterminado
log_info "Configurando VLC como reproductor predeterminado..."
xdg-mime default vlc.desktop audio/mpeg 2>/dev/null || true
xdg-mime default vlc.desktop audio/mp4 2>/dev/null || true
xdg-mime default vlc.desktop audio/x-wav 2>/dev/null || true
xdg-mime default vlc.desktop video/mp4 2>/dev/null || true
xdg-mime default vlc.desktop video/x-matroska 2>/dev/null || true
xdg-mime default vlc.desktop video/x-msvideo 2>/dev/null || true
xdg-mime default vlc.desktop video/x-ms-wmv 2>/dev/null || true
xdg-mime default vlc.desktop video/webm 2>/dev/null || true
# Aplicaciones de red y transferencia de archivos
local mime_types=("audio/mpeg" "audio/mp4" "audio/x-wav" "video/mp4" "video/x-matroska" "video/x-msvideo" "video/x-ms-wmv" "video/webm")
for type in "${mime_types[@]}"; do
xdg-mime default vlc.desktop "$type" 2>/dev/null || true
done
log_info "Instalando aplicaciones de red..."
sudo pacman -S --noconfirm --needed \
filezilla telegram-desktop scrcpy || {
sudo pacman -S --noconfirm --needed "${PACMAN_NETWORK[@]}" || {
log_warning "Algunos paquetes de red no se pudieron instalar"
}
@@ -74,11 +84,9 @@ install_apps() {
sudo pacman -S --noconfirm --needed flatpak || {
log_warning "Flatpak no se pudo instalar"
}
# Drivers y codecs para Intel Iris Xe
log_info "Instalando drivers y codecs para Intel Iris Xe..."
# Instalar headers del kernel si son necesarios
KVER="$(uname -r)"
if [[ ! -d "/usr/lib/modules/${KVER}/build" ]]; then
log_info "Instalando headers de kernel..."
@@ -86,57 +94,30 @@ install_apps() {
log_warning "No se pudieron instalar headers de kernel"
}
fi
# Drivers de gráficos Intel
log_info "Instalando drivers de gráficos Intel..."
sudo pacman -S --noconfirm --needed \
mesa vulkan-intel \
lib32-mesa lib32-vulkan-intel || {
sudo pacman -S --noconfirm --needed "${PACMAN_INTEL_GFX[@]}" || {
log_warning "Algunos drivers de gráficos no se pudieron instalar"
}
# Drivers de video y hardware acceleration
log_info "Instalando drivers de video Intel (VA-API/VDPAU)..."
sudo pacman -S --noconfirm --needed \
intel-media-driver \
libva-utils \
libvdpau-va-gl \
libva-mesa-driver || {
sudo pacman -S --noconfirm --needed "${PACMAN_INTEL_VIDEO[@]}" || {
log_warning "Algunos drivers de video no se pudieron instalar"
}
# OpenCL para Intel
log_info "Instalando soporte OpenCL para Intel..."
sudo pacman -S --noconfirm --needed \
ocl-icd \
libclc \
clinfo || {
sudo pacman -S --noconfirm --needed "${PACMAN_OPENCL[@]}" || {
log_warning "Algunos paquetes OpenCL no se pudieron instalar"
}
# Verificar e instalar helper AUR si es necesario
AUR_HELPER=$(ensure_aur_helper)
# Intel Compute Runtime desde AUR (necesario para OpenCL en Intel)
log_info "Instalando Intel Compute Runtime desde AUR..."
if [ "$AUR_HELPER" = "yay" ]; then
yay -S --noconfirm intel-compute-runtime || {
log_warning "No se pudo instalar intel-compute-runtime desde AUR"
}
elif [ "$AUR_HELPER" = "paru" ]; then
paru -S --noconfirm intel-compute-runtime || {
log_warning "No se pudo instalar intel-compute-runtime desde AUR"
}
fi
# Configurar OpenCL para Intel
if [[ ! -f /etc/OpenCL/vendors/intel.icd ]] && [[ -f /usr/lib/intel-opencl/libigdrcl.so ]]; then
log_info "Configurando OpenCL para Intel..."
sudo mkdir -p /etc/OpenCL/vendors
echo "/usr/lib/intel-opencl/libigdrcl.so" | sudo tee /etc/OpenCL/vendors/intel.icd >/dev/null
fi
# Actualizar cache de librerías
sudo ldconfig || true
# Verificar instalación de drivers
@@ -151,17 +132,7 @@ install_apps() {
clinfo 2>/dev/null | grep -E "Platform Name|Device Name" || true
fi
# Aplicaciones desde AUR
log_info "Instalando aplicaciones desde AUR..."
AUR_PACKAGES=(
"visual-studio-code-bin"
"cursor-bin"
"keyd"
"fragments"
"logiops"
"ltunify"
"teamviewer"
)
for pkg in "${AUR_PACKAGES[@]}"; do
log_info "Instalando ${pkg}..."
@@ -207,5 +178,5 @@ install_apps() {
# Ejecutar si se llama directamente
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
install_apps "$@"
run_module_main "$@"
fi