instalar powerlvl100k

PHOTO EMBED

Thu Dec 04 2025 20:18:23 GMT+0000 (Coordinated Universal Time)

Saved by @jrg_300i #yii2

🚀 Guía Completa: Instalación de Zsh + Oh My Zsh + Powerlevel10k desde Cero
📋 PRIMERO: Verificar tu entorno actual
bash
# Verifica qué shell estás usando actualmente
echo $SHELL        # Shell por defecto
echo $0            # Shell actual en uso
ps -p $$           # Proceso actual

# Verifica si ya tienes instalaciones previas
ls -la ~/.oh-my-zsh/ 2>/dev/null || echo "No hay Oh My Zsh instalado"
ls -la ~/.powerlevel10k/ 2>/dev/null || echo "No hay Powerlevel10k instalado"
🔄 OPCIONAL: Limpiar instalaciones anteriores (si es necesario)
bash
# ⚠️ SOLO EJECUTAR SI QUIERES PARTIR DESDE CERO ⚠️
# Esto eliminará configuraciones previas
rm -rf ~/.oh-my-zsh ~/.powerlevel10k ~/.zshrc ~/.cache/p10k*
echo "Configuraciones anteriores eliminadas"
🎯 PASO 1: Instalar Zsh (si no lo tienes)
Para Debian/Ubuntu/MX Linux:
bash
# Actualizar repositorios e instalar Zsh
sudo apt update
sudo apt install -y zsh git curl fonts-powerline

# Verificar instalación
zsh --version
Para Arch Linux:
bash
sudo pacman -S zsh git curl powerline-fonts
Para Fedora/RHEL:
bash
sudo dnf install zsh git curl powerline-fonts
🛠 PASO 2: Cambiar shell por defecto a Zsh
bash
# Cambiar el shell por defecto a Zsh
chsh -s $(which zsh)

# Verificar el cambio
echo $SHELL  # Debería mostrar /bin/zsh o similar

# IMPORTANTE: Cierra y abre una NUEVA terminal para que el cambio surta efecto
# O ejecuta:
exec zsh
⭐ PASO 3: Instalar Oh My Zsh
bash
# Instalar Oh My Zsh con el script oficial
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# Esto creará automáticamente:
# - ~/.oh-my-zsh/         # Directorio principal
# - ~/.zshrc             # Archivo de configuración
# - Tema "robbyrussell" por defecto
🧩 PASO 4: Instalar plugins esenciales
bash
# Navegar al directorio de plugins personalizados
cd ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/

# Instalar Zsh Autosuggestions (sugerencias de comandos)
git clone https://github.com/zsh-users/zsh-autosuggestions.git

# Instalar Zsh Syntax Highlighting (resaltado de sintaxis)
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

# Verificar que se instalaron correctamente
ls -la
🌈 PASO 5: Instalar Powerlevel10k
bash
# Método 1: Como tema de Oh My Zsh (recomendado)
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

# Método 2: Instalación manual (alternativa)
# git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.powerlevel10k
⚙️ PASO 6: Configurar ~/.zshrc
Edita tu archivo de configuración:

bash
nano ~/.zshrc
Configuración recomendada:
bash
# ~/.zshrc - Configuración óptima

# Path a tu instalación de Oh My Zsh
export ZSH="$HOME/.oh-my-zsh"

# 1. TEMA: Usar Powerlevel10k
# COMENTA O ELIMINA: ZSH_THEME="robbyrussell"
# AÑADE:
ZSH_THEME="powerlevel10k/powerlevel10k"

# 2. PLUGINS: Lista completa de plugins
plugins=(
    git                     # Integración con Git
    zsh-autosuggestions     # Sugerencias automáticas
    zsh-syntax-highlighting # Resaltado de sintaxis
    sudo                    # Doble ESC para sudo
    history-substring-search # Búsqueda en historial
    colored-man-pages       # Manuales a color
    extract                 # Extraer archivos: extract archivo.tar.gz
    docker                  # Comandos Docker
    composer                # Comandos Composer
    laravel                 # Comandos Laravel
)

# 3. Cargar Oh My Zsh
source $ZSH/oh-my-zsh.sh

# 4. Configuración de Powerlevel10k
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

  🔧 PASO 7: Configurar Powerlevel10k
bash
# Recargar la configuración
source ~/.zshrc

# Iniciar el configurador interactivo de Powerlevel10k
p10k configure

# Sigue las instrucciones en pantalla para personalizar tu prompt

  # Recargar toda la configuración
source ~/.zshrc
content_copyCOPY