mirror of
https://github.com/marcogll/scripts_mg.git
synced 2026-01-13 13:25:15 +00:00
Refactor Omarchy setup script for clarity and updates
Updated the Omarchy setup script to improve clarity and functionality. Adjusted comments, removed unnecessary lines, and added additional configuration for VLC and Homebrew.
This commit is contained in:
@@ -1,27 +1,28 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# ===============================================================
|
# ===============================================================
|
||||||
# 🧠 Omarchy Setup Script v3.0 — Intel Edition
|
# 🧠 Omarchy Setup Script — Intel Edition
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# Autor: Marco G.
|
# Autor: Marco G.
|
||||||
# Descripción:
|
# Descripción:
|
||||||
# Prepara un entorno completo de trabajo con Zsh, Oh My Zsh,
|
# Prepara un entorno completo de trabajo con Zsh, Oh My Zsh,
|
||||||
# Oh My Posh, Homebrew, herramientas de desarrollo, codecs Intel,
|
# Oh My Posh, Homebrew, herramientas de desarrollo, codecs Intel,
|
||||||
# drivers Epson, Logitech, VLC y utilidades varias.
|
# drivers Epson, Logitech y utilidades varias.
|
||||||
# Este script NO instala DaVinci Resolve, solo deja el sistema listo.
|
# Este script también configura VLC como reproductor por defecto
|
||||||
|
# y descarga tus archivos personalizados de Omarchy.
|
||||||
# ===============================================================
|
# ===============================================================
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 🧩 Función de seguridad: abortar si algo falla
|
# 🧩 Seguridad: abortar si algo falla
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
set -e
|
set -e
|
||||||
trap 'echo "❌ Error en la línea $LINENO. Abortando instalación."; exit 1' ERR
|
trap 'echo "❌ Error en la línea $LINENO. Abortando instalación."; exit 1' ERR
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 🎨 Banner inicial estilo Catppuccin
|
# 🎨 Banner de inicio
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
cat << "EOF"
|
cat << "EOF"
|
||||||
╔═════════════════════════════════════════════════════╗
|
╔═════════════════════════════════════════════════════╗
|
||||||
║ 🧠 Omarchy System Setup v3.0 ║
|
║ 🧠 Omarchy System Setup ║
|
||||||
║ Intel Iris Xe • Arch Linux ║
|
║ Intel Iris Xe • Arch Linux ║
|
||||||
╚═════════════════════════════════════════════════════╝
|
╚═════════════════════════════════════════════════════╝
|
||||||
EOF
|
EOF
|
||||||
@@ -43,7 +44,7 @@ sudo pacman -S --needed --noconfirm \
|
|||||||
flatpak
|
flatpak
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 🖥️ Instalación de controladores Intel Iris Xe
|
# 🖥️ Controladores Intel Iris Xe y codecs multimedia
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
echo "🎞️ Instalando controladores y codecs para Intel Iris Xe..."
|
echo "🎞️ Instalando controladores y codecs para Intel Iris Xe..."
|
||||||
sudo pacman -S --needed --noconfirm \
|
sudo pacman -S --needed --noconfirm \
|
||||||
@@ -51,23 +52,28 @@ sudo pacman -S --needed --noconfirm \
|
|||||||
vulkan-intel vulkan-icd-loader \
|
vulkan-intel vulkan-icd-loader \
|
||||||
libvdpau-va-gl libva-utils \
|
libvdpau-va-gl libva-utils \
|
||||||
gstreamer gst-libav gst-plugins-good gst-plugins-bad gst-plugins-ugly \
|
gstreamer gst-libav gst-plugins-good gst-plugins-bad gst-plugins-ugly \
|
||||||
ffmpeg opencl-clang intel-compute-runtime clinfo
|
ffmpeg intel-compute-runtime clinfo
|
||||||
|
|
||||||
|
# opencl-clang (viene de AUR)
|
||||||
|
if ! pacman -Q opencl-clang &>/dev/null; then
|
||||||
|
echo "⚙️ Instalando opencl-clang desde AUR..."
|
||||||
|
yay -S --noconfirm opencl-clang
|
||||||
|
fi
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 🎵 Instalación de VLC + codecs + configuración predeterminada
|
# 🎬 Instalación de VLC y codecs adicionales
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
echo "🎶 Instalando VLC y codecs multimedia..."
|
echo "🎧 Instalando VLC y codecs multimedia..."
|
||||||
sudo pacman -S --needed --noconfirm vlc
|
sudo pacman -S --needed --noconfirm vlc vlc-plugins-all
|
||||||
|
|
||||||
# Establecer VLC como reproductor predeterminado de audio y video
|
# Asociar archivos multimedia con VLC
|
||||||
echo "⚙️ Configurando VLC como reproductor predeterminado..."
|
echo "🗂️ Configurando VLC como reproductor por defecto..."
|
||||||
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/x-wav
|
xdg-mime default vlc.desktop audio/x-wav
|
||||||
xdg-mime default vlc.desktop audio/flac
|
|
||||||
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
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 🧾 Impresoras Epson (L4150 + Epson Scan2)
|
# 🧾 Impresoras Epson (L4150 + Epson Scan2)
|
||||||
@@ -91,7 +97,7 @@ sudo pacman -S --needed --noconfirm \
|
|||||||
filezilla gedit code cursor telegram-desktop
|
filezilla gedit code cursor telegram-desktop
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 🧴 Instalación de Zsh + Oh My Zsh + plugins + Oh My Posh
|
# 💄 Instalación de Zsh + Oh My Zsh + plugins + Oh My Posh
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
echo "💄 Instalando Zsh y entorno de shell..."
|
echo "💄 Instalando Zsh y entorno de shell..."
|
||||||
sudo pacman -S --needed --noconfirm zsh
|
sudo pacman -S --needed --noconfirm zsh
|
||||||
@@ -128,25 +134,34 @@ if ! command -v brew &>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 🧩 Configuración de .bashrc (lanza Zsh + Homebrew env)
|
# ⚙️ Configuración de .bashrc para lanzar Zsh y Homebrew
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
echo "⚙️ Ajustando ~/.bashrc..."
|
echo "⚙️ Ajustando ~/.bashrc..."
|
||||||
cat << 'EOBASH' > ~/.bashrc
|
cat << 'EOBASH' > ~/.bashrc
|
||||||
# If not running interactively, don't do anything
|
# Si no es interactivo, salir
|
||||||
[[ $- != *i* ]] && return
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
# Omarchy default rc
|
# Inicializar Homebrew
|
||||||
source ~/.local/share/omarchy/default/bash/rc
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
|
|
||||||
# Lanzar Zsh automáticamente si no estamos ya en Zsh
|
# Lanzar Zsh automáticamente si no estamos ya en Zsh
|
||||||
if [ -t 1 ] && [ -z "$ZSH_VERSION" ]; then
|
if [ -t 1 ] && [ -z "$ZSH_VERSION" ]; then
|
||||||
exec zsh
|
exec zsh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Inicializar Homebrew
|
|
||||||
eval "$($(brew --prefix)/bin/brew shellenv)"
|
|
||||||
EOBASH
|
EOBASH
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
# 📥 Descarga de configuraciones y scripts de Omarchy
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
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
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 🔐 Activar servicios básicos
|
# 🔐 Activar servicios básicos
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@@ -160,8 +175,8 @@ sudo systemctl enable --now gnome-keyring-daemon.service || true
|
|||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
cat << "EOF"
|
cat << "EOF"
|
||||||
╔═══════════════════════════════════════════════════════════╗
|
╔═══════════════════════════════════════════════════════════╗
|
||||||
║ ✅ Sistema preparado con éxito — Omarchy Setup v3.0 ║
|
║ ✅ Sistema preparado con éxito — Omarchy Setup ║
|
||||||
║ Reinicia tu sesión o ejecuta 'exec zsh' para aplicar todo ║
|
║ Reinicia tu sesión o ejecuta 'exec zsh' para aplicar todo ║
|
||||||
║ Luego copia tu archivo .zshrc de Omarchy v2.1. ║
|
║ Archivos descargados en ~/Omarchy ║
|
||||||
╚═══════════════════════════════════════════════════════════╝
|
╚═══════════════════════════════════════════════════════════╝
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user