# --------------------------------------------------------------- # Vanity Shell — Configuración base para Zsh en macOS # --------------------------------------------------------------- # Incluye Oh My Zsh, Oh My Posh, historial afinado y alias útiles. # Este archivo es copiado automáticamente a ~/.zshrc por vanity_setup.sh. # --------------------------------------------------------------- # PATH — añade rutas clave antes del resto del sistema # --------------------------------------------------------------- if [ -d /opt/homebrew/bin ]; then export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" fi if [ -d "$HOME/.local/bin" ]; then export PATH="$HOME/.local/bin:$PATH" fi if [ -d "$HOME/bin" ]; then export PATH="$HOME/bin:$PATH" fi # --------------------------------------------------------------- # Oh My Zsh — Framework principal + plugins # --------------------------------------------------------------- export ZSH="$HOME/.oh-my-zsh" ZSH_THEME="robbyrussell" # el prompt real lo gestiona Oh My Posh plugins=( git sudo history colorize docker docker-compose npm node python pip golang copypath copyfile zsh-autosuggestions zsh-syntax-highlighting zsh-completions ) source $ZSH/oh-my-zsh.sh # --------------------------------------------------------------- # Oh My Posh — Prompt moderno (tema Catppuccin) # --------------------------------------------------------------- if command -v oh-my-posh >/dev/null 2>&1; then eval "$(oh-my-posh init zsh --config ~/.poshthemes/catppuccin.omp.json)" fi # --------------------------------------------------------------- # Historial y opciones de shell # --------------------------------------------------------------- HISTFILE=~/.zsh_history HISTSIZE=50000 SAVEHIST=50000 setopt SHARE_HISTORY setopt HIST_IGNORE_SPACE setopt HIST_IGNORE_DUPS setopt HIST_VERIFY setopt AUTO_CD setopt CORRECT setopt COMPLETE_ALIASES # --------------------------------------------------------------- # Preferencias básicas # --------------------------------------------------------------- export CLICOLOR=1 export LSCOLORS="GxFxCxDxBxegedabagacad" export EDITOR="nano" # --------------------------------------------------------------- # Alias — accesos rápidos de uso frecuente # --------------------------------------------------------------- alias ll="ls -lah" alias gs="git status -sb" alias gl="git log --oneline --graph --decorate" alias gc="git commit" alias gp="git push" alias d="docker" alias dc="docker compose" alias reload-zsh="source ~/.zshrc" alias portainer="open https://localhost:9443" alias ytv='yt-dlp -P "$HOME/videos/youtube"' alias ytm='yt-dlp -x --audio-format mp3 --audio-quality 0 -o "%(title)s.%(ext)s" -P "$HOME/musica/youtube"' # --------------------------------------------------------------- # Integraciones opcionales # --------------------------------------------------------------- if command -v direnv >/dev/null 2>&1; then eval "$(direnv hook zsh)" fi # --------------------------------------------------------------- # Ayuda rápida de Vanity Shell # --------------------------------------------------------------- help() { cat <<'EOF' Vanity Shell — comandos rápidos: ytv -> Descarga el video completo en ~/videos/youtube ytm -> Descarga solo el audio (mp3) en ~/musica/youtube Ejemplos: ytv https://youtu.be/videoID ytm https://youtu.be/trackID Recuerda que ambos comandos requieren yt-dlp/ffmpeg instalados (el setup ya los incluye). EOF }