mirror of
https://github.com/marcogll/scripts_mg.git
synced 2026-01-13 13:25:15 +00:00
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.
This commit is contained in:
@@ -1,140 +1,114 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# ===============================================================
|
#───────────────────────────────────────────────────────────────
|
||||||
# 🧠 Omarchy Setup Script — Intel Edition
|
# 🌀 Omarchy Setup Script — Configuración base para Arch Linux
|
||||||
# ---------------------------------------------------------------
|
#───────────────────────────────────────────────────────────────
|
||||||
# Autor: Marco G.
|
# Este script prepara un entorno listo para usar con Zsh, Docker,
|
||||||
# Descripción:
|
# Portainer, VS Code, Cursor, VLC (por defecto en multimedia),
|
||||||
# Prepara un entorno completo de trabajo con Zsh, Oh My Zsh,
|
# y descarga scripts y configuraciones personalizados desde
|
||||||
# Oh My Posh, Homebrew, herramientas de desarrollo, codecs Intel,
|
# tu repositorio oficial de GitHub.
|
||||||
# drivers Epson, Logitech y utilidades varias.
|
#───────────────────────────────────────────────────────────────
|
||||||
# Este script también configura VLC como reproductor por defecto
|
|
||||||
# y descarga tus archivos personalizados de Omarchy.
|
|
||||||
# ===============================================================
|
|
||||||
|
|
||||||
set -e
|
set -e # Detiene el script si algo falla
|
||||||
trap 'echo "❌ Error en la línea $LINENO. Abortando instalación."; exit 1' ERR
|
REPO_BASE="https://raw.githubusercontent.com/marcogll/scripts_mg/refs/heads/main/omarchy_zsh_setup"
|
||||||
|
|
||||||
cat << "EOF"
|
#───────────────────────────────────────────────────────────────
|
||||||
╔═════════════════════════════════════════════════════╗
|
# 🌐 Actualización del sistema
|
||||||
║ 🧠 Omarchy System Setup ║
|
#───────────────────────────────────────────────────────────────
|
||||||
║ Intel Iris Xe • Arch Linux ║
|
echo "→ Actualizando el sistema..."
|
||||||
╚═════════════════════════════════════════════════════╝
|
|
||||||
EOF
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
echo "🔧 Actualizando sistema base..."
|
|
||||||
sudo pacman -Syu --noconfirm
|
sudo pacman -Syu --noconfirm
|
||||||
|
|
||||||
echo "📦 Instalando utilidades esenciales..."
|
#───────────────────────────────────────────────────────────────
|
||||||
sudo pacman -S --needed --noconfirm \
|
# ⚙️ Instalación de herramientas base y dependencias
|
||||||
base-devel git curl wget zip unzip p7zip unrar tar \
|
#───────────────────────────────────────────────────────────────
|
||||||
fastfetch nano htop btop eza tree zoxide bat fzf ripgrep \
|
echo "→ Instalando paquetes base..."
|
||||||
python python-pip nodejs npm go \
|
sudo pacman -S --noconfirm --needed \
|
||||||
docker docker-compose \
|
git curl wget base-devel unzip zsh zsh-completions zsh-syntax-highlighting \
|
||||||
gnome-keyring openssh lsof ntp \
|
zsh-autosuggestions neofetch htop fastfetch btop vim nano tmux \
|
||||||
flatpak
|
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 \
|
# ⚙️ Configuración de Docker y Portainer
|
||||||
mesa libva-intel-driver intel-media-driver \
|
#───────────────────────────────────────────────────────────────
|
||||||
vulkan-intel vulkan-icd-loader \
|
echo "→ Configurando Docker y Portainer..."
|
||||||
libvdpau-va-gl libva-utils \
|
sudo systemctl enable docker.service
|
||||||
gstreamer gst-libav gst-plugins-good gst-plugins-bad gst-plugins-ugly \
|
sudo systemctl enable containerd.service
|
||||||
ffmpeg intel-compute-runtime clinfo
|
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..."
|
# 🧠 Instalación de AUR packages (Cursor, Intel OpenCL)
|
||||||
yay -S --noconfirm opencl-clang || echo "⚠️ No se pudo instalar opencl-clang (omitido)."
|
#───────────────────────────────────────────────────────────────
|
||||||
|
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
|
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/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 audio/x-wav
|
||||||
xdg-mime default vlc.desktop video/mp4
|
xdg-mime default vlc.desktop video/mp4
|
||||||
xdg-mime default vlc.desktop video/x-matroska
|
xdg-mime default vlc.desktop video/x-matroska
|
||||||
xdg-mime default vlc.desktop video/x-msvideo
|
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
|
# 🧼 Limpieza final
|
||||||
sudo systemctl enable --now cups.service
|
#───────────────────────────────────────────────────────────────
|
||||||
yay -S --needed --noconfirm epson-inkjet-printer-escpr2 epson-scanner-2 || echo "⚠️ Epson scanner no disponible en AUR."
|
echo "→ Limpiando paquetes huérfanos..."
|
||||||
|
sudo pacman -Rns $(pacman -Qtdq) --noconfirm || true
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
#───────────────────────────────────────────────────────────────
|
||||||
# ✅ Verificar e instalar yay si no existe
|
# ✅ Finalización
|
||||||
# ---------------------------------------------------------------
|
#───────────────────────────────────────────────────────────────
|
||||||
if ! command -v yay &>/dev/null; then
|
echo ""
|
||||||
echo "📦 Instalando yay (AUR helper)..."
|
echo "────────────────────────────────────────────"
|
||||||
cd /tmp
|
echo "✅ Instalación de entorno Omarchy completada"
|
||||||
git clone https://aur.archlinux.org/yay-bin.git
|
echo "────────────────────────────────────────────"
|
||||||
cd yay-bin
|
echo "Zsh configurado, Docker y Portainer listos,"
|
||||||
makepkg -si --noconfirm
|
echo "VLC por defecto en multimedia, VS Code y Cursor instalados."
|
||||||
cd ~
|
echo ""
|
||||||
fi
|
echo "Siguiente paso: ejecutar tu script de DaVinci Resolve si corresponde."
|
||||||
|
echo "Ubicación: ~/davince_resolve_intel.sh"
|
||||||
# ---------------------------------------------------------------
|
echo ""
|
||||||
# 🖱️ 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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user