From 2bd6a29e65e2e2110edf3458ced08c52c7d8bd62 Mon Sep 17 00:00:00 2001 From: Marco Gallegos Date: Thu, 6 Nov 2025 15:14:38 -0600 Subject: [PATCH] Revise Omarchy setup script for Arch Linux Updated the Omarchy setup script for Arch Linux, enhancing package installations and configurations while removing Intel-specific references. The script now includes Docker, Portainer, and VS Code setup instructions, along with personalized configuration downloads. --- omarchy_zsh_setup/omarchy-setup.sh | 220 +++++++++++++---------------- 1 file changed, 97 insertions(+), 123 deletions(-) diff --git a/omarchy_zsh_setup/omarchy-setup.sh b/omarchy_zsh_setup/omarchy-setup.sh index 3fa51db..23e3bd2 100644 --- a/omarchy_zsh_setup/omarchy-setup.sh +++ b/omarchy_zsh_setup/omarchy-setup.sh @@ -1,140 +1,114 @@ #!/usr/bin/env bash -# =============================================================== -# 🧠 Omarchy Setup Script β€” Intel Edition -# --------------------------------------------------------------- -# Autor: Marco G. -# DescripciΓ³n: -# Prepara un entorno completo de trabajo con Zsh, Oh My Zsh, -# Oh My Posh, Homebrew, herramientas de desarrollo, codecs Intel, -# drivers Epson, Logitech y utilidades varias. -# Este script tambiΓ©n configura VLC como reproductor por defecto -# y descarga tus archivos personalizados de Omarchy. -# =============================================================== +#─────────────────────────────────────────────────────────────── +# πŸŒ€ Omarchy Setup Script β€” ConfiguraciΓ³n base para Arch Linux +#─────────────────────────────────────────────────────────────── +# Este script prepara un entorno listo para usar con Zsh, Docker, +# Portainer, VS Code, Cursor, VLC (por defecto en multimedia), +# y descarga scripts y configuraciones personalizados desde +# tu repositorio oficial de GitHub. +#─────────────────────────────────────────────────────────────── -set -e -trap 'echo "❌ Error en la lΓ­nea $LINENO. Abortando instalaciΓ³n."; exit 1' ERR +set -e # Detiene el script si algo falla +REPO_BASE="https://raw.githubusercontent.com/marcogll/scripts_mg/refs/heads/main/omarchy_zsh_setup" -cat << "EOF" -╔═════════════════════════════════════════════════════╗ -β•‘ 🧠 Omarchy System Setup β•‘ -β•‘ Intel Iris Xe β€’ Arch Linux β•‘ -β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• -EOF -sleep 1 - -echo "πŸ”§ Actualizando sistema base..." +#─────────────────────────────────────────────────────────────── +# 🌐 ActualizaciΓ³n del sistema +#─────────────────────────────────────────────────────────────── +echo "β†’ Actualizando el sistema..." sudo pacman -Syu --noconfirm -echo "πŸ“¦ Instalando utilidades esenciales..." -sudo pacman -S --needed --noconfirm \ - base-devel git curl wget zip unzip p7zip unrar tar \ - fastfetch nano htop btop eza tree zoxide bat fzf ripgrep \ - python python-pip nodejs npm go \ - docker docker-compose \ - gnome-keyring openssh lsof ntp \ - flatpak +#─────────────────────────────────────────────────────────────── +# βš™οΈ InstalaciΓ³n de herramientas base y dependencias +#─────────────────────────────────────────────────────────────── +echo "β†’ Instalando paquetes base..." +sudo pacman -S --noconfirm --needed \ + git curl wget base-devel unzip zsh zsh-completions zsh-syntax-highlighting \ + zsh-autosuggestions neofetch htop fastfetch btop vim nano tmux \ + docker docker-compose portainer \ + code vlc vlc-plugin libdvdcss ffmpeg gstreamer gst-plugins-good gst-plugins-bad gst-plugins-ugly \ + xdg-utils xdg-user-dirs -echo "🎞️ Instalando controladores y codecs para Intel Iris Xe..." -sudo pacman -S --needed --noconfirm \ - mesa libva-intel-driver intel-media-driver \ - vulkan-intel vulkan-icd-loader \ - libvdpau-va-gl libva-utils \ - gstreamer gst-libav gst-plugins-good gst-plugins-bad gst-plugins-ugly \ - ffmpeg intel-compute-runtime clinfo +#─────────────────────────────────────────────────────────────── +# βš™οΈ ConfiguraciΓ³n de Docker y Portainer +#─────────────────────────────────────────────────────────────── +echo "β†’ Configurando Docker y Portainer..." +sudo systemctl enable docker.service +sudo systemctl enable containerd.service +sudo systemctl start docker.service +sudo docker volume create portainer_data +sudo docker run -d -p 8000:8000 -p 9443:9443 \ + --name portainer \ + --restart=always \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v portainer_data:/data \ + portainer/portainer-ce:latest -if ! pacman -Q opencl-clang &>/dev/null; then - echo "βš™οΈ Instalando opencl-clang desde AUR..." - yay -S --noconfirm opencl-clang || echo "⚠️ No se pudo instalar opencl-clang (omitido)." +#─────────────────────────────────────────────────────────────── +# 🧠 InstalaciΓ³n de AUR packages (Cursor, Intel OpenCL) +#─────────────────────────────────────────────────────────────── +echo "β†’ Verificando helper AUR (yay o paru)..." +if command -v yay >/dev/null 2>&1; then + echo "β†’ Instalando paquetes AUR con yay..." + yay -S --noconfirm intel-opencl-clang-git cursor-bin +elif command -v paru >/dev/null 2>&1; then + echo "β†’ Instalando paquetes AUR con paru..." + paru -S --noconfirm intel-opencl-clang-git cursor-bin +else + echo "⚠️ No se detectΓ³ yay ni paru. Instalando yay..." + cd /tmp + git clone https://aur.archlinux.org/yay-bin.git + cd yay-bin + makepkg -si --noconfirm + yay -S --noconfirm intel-opencl-clang-git cursor-bin fi -echo "🎧 Instalando VLC y codecs multimedia..." -sudo pacman -S --needed --noconfirm vlc vlc-plugins-all +#─────────────────────────────────────────────────────────────── +# 🧰 Descarga de configuraciones personalizadas desde GitHub +#─────────────────────────────────────────────────────────────── +echo "β†’ Descargando configuraciΓ³n de Zsh y scripts..." +cd ~ +curl -fsSL "$REPO_BASE/.zshrc" -o ~/.zshrc +curl -fsSL "$REPO_BASE/omarchy-setup.sh" -o ~/omarchy-setup.sh +curl -fsSL "$REPO_BASE/davince_resolve_intel.sh" -o ~/davince_resolve_intel.sh +chmod +x ~/omarchy-setup.sh ~/davince_resolve_intel.sh -echo "πŸ—‚οΈ Configurando VLC como reproductor por defecto..." +#─────────────────────────────────────────────────────────────── +# 🧩 ConfiguraciΓ³n de Zsh como shell por defecto +#─────────────────────────────────────────────────────────────── +if [ "$SHELL" != "/bin/zsh" ]; then + echo "β†’ Configurando Zsh como shell predeterminada..." + chsh -s /bin/zsh +fi + +#─────────────────────────────────────────────────────────────── +# 🎧 ConfiguraciΓ³n de VLC como reproductor multimedia predeterminado +#─────────────────────────────────────────────────────────────── +echo "β†’ Configurando VLC como reproductor predeterminado..." xdg-mime default vlc.desktop audio/mpeg -xdg-mime default vlc.desktop audio/mp3 +xdg-mime default vlc.desktop audio/mp4 xdg-mime default vlc.desktop audio/x-wav xdg-mime default vlc.desktop video/mp4 xdg-mime default vlc.desktop video/x-matroska xdg-mime default vlc.desktop video/x-msvideo +xdg-mime default vlc.desktop video/x-ms-wmv +xdg-mime default vlc.desktop video/webm -echo "πŸ–¨οΈ Instalando drivers Epson..." -sudo pacman -S --needed --noconfirm cups sane simple-scan -sudo systemctl enable --now cups.service -yay -S --needed --noconfirm epson-inkjet-printer-escpr2 epson-scanner-2 || echo "⚠️ Epson scanner no disponible en AUR." +#─────────────────────────────────────────────────────────────── +# 🧼 Limpieza final +#─────────────────────────────────────────────────────────────── +echo "β†’ Limpiando paquetes huΓ©rfanos..." +sudo pacman -Rns $(pacman -Qtdq) --noconfirm || true -# --------------------------------------------------------------- -# βœ… Verificar e instalar yay si no existe -# --------------------------------------------------------------- -if ! command -v yay &>/dev/null; then - echo "πŸ“¦ Instalando yay (AUR helper)..." - cd /tmp - git clone https://aur.archlinux.org/yay-bin.git - cd yay-bin - makepkg -si --noconfirm - cd ~ -fi - -# --------------------------------------------------------------- -# πŸ–±οΈ Logitech: ltunify y logiops desde AUR -# --------------------------------------------------------------- -echo "πŸ–±οΈ Instalando soporte Logitech..." -yay -S --noconfirm --needed ltunify logiops || echo "⚠️ No se pudieron instalar algunos paquetes Logitech (omitidos)." - -echo "πŸ’» Instalando aplicaciones grΓ‘ficas..." -sudo pacman -S --needed --noconfirm filezilla gedit code cursor telegram-desktop - -echo "πŸ’„ Instalando Zsh y entorno de shell..." -sudo pacman -S --needed --noconfirm zsh -if [ "$SHELL" != "/bin/zsh" ]; then - chsh -s /bin/zsh -fi - -if [ ! -d "$HOME/.oh-my-zsh" ]; then - echo "🌈 Instalando Oh My Zsh..." - RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -fi - -echo "πŸ”Œ Instalando plugins de Zsh..." -ZSH_CUSTOM=${ZSH_CUSTOM:-~/.oh-my-zsh/custom} -git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions 2>/dev/null || true -git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting 2>/dev/null || true -git clone https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/colorize $ZSH_CUSTOM/plugins/colorize 2>/dev/null || true - -echo "✨ Instalando Oh My Posh..." -curl -s https://ohmyposh.dev/install.sh | bash -s -oh-my-posh font install meslo - -echo "🍺 Instalando Homebrew..." -if ! command -v brew &>/dev/null; then - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -fi - -echo "βš™οΈ Ajustando ~/.bashrc..." -cat << 'EOBASH' > ~/.bashrc -[[ $- != *i* ]] && return -eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" -if [ -t 1 ] && [ -z "$ZSH_VERSION" ]; then - exec zsh -fi -EOBASH - -echo "πŸ“₯ Descargando configuraciones de Omarchy..." -mkdir -p ~/Omarchy -curl -fsSL -o ~/.zshrc "https://raw.githubusercontent.com/marcogll/scripts_mg/refs/heads/main/omarchy_zsh_setup/.zshrc" -curl -fsSL -o ~/Omarchy/omarchy-setup.sh "https://raw.githubusercontent.com/marcogll/scripts_mg/refs/heads/main/omarchy_zsh_setup/omarchy-setup.sh" -curl -fsSL -o ~/Omarchy/davinci_resolve_intel.sh "https://raw.githubusercontent.com/marcogll/scripts_mg/refs/heads/main/omarchy_zsh_setup/davince_resolve_intel.sh" -chmod +x ~/Omarchy/*.sh - -echo "πŸ”‘ Habilitando servicios..." -sudo systemctl enable --now docker.service -sudo systemctl enable --now ntpd.service -sudo systemctl enable --now gnome-keyring-daemon.service || true - -cat << "EOF" -╔═══════════════════════════════════════════════════════════╗ -β•‘ βœ… Sistema preparado con Γ©xito β€” Omarchy Setup β•‘ -β•‘ Reinicia tu sesiΓ³n o ejecuta 'exec zsh' para aplicar todo β•‘ -β•‘ Archivos descargados en ~/Omarchy β•‘ -β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• -EOF +#─────────────────────────────────────────────────────────────── +# βœ… FinalizaciΓ³n +#─────────────────────────────────────────────────────────────── +echo "" +echo "────────────────────────────────────────────" +echo "βœ… InstalaciΓ³n de entorno Omarchy completada" +echo "────────────────────────────────────────────" +echo "Zsh configurado, Docker y Portainer listos," +echo "VLC por defecto en multimedia, VS Code y Cursor instalados." +echo "" +echo "Siguiente paso: ejecutar tu script de DaVinci Resolve si corresponde." +echo "UbicaciΓ³n: ~/davince_resolve_intel.sh" +echo ""