Files
mac_vntySet/.zshrc.example
2025-11-19 19:11:57 -06:00

190 lines
4.7 KiB
Plaintext

############################################
# OH MY ZSH
############################################
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
plugins=(
git
docker
)
source $ZSH/oh-my-zsh.sh
############################################
# OH MY POSH (Catppuccin)
############################################
eval "$(oh-my-posh init zsh --config ~/.poshthemes/catppuccin.omp.json)"
############################################
# MODULAR CONFIG (~/.config/zsh)
############################################
mkdir -p ~/.config/zsh
# Cargar módulos si existen
for f in ~/.config/zsh/*.zsh; do
[ -r "$f" ] && source "$f"
done
############################################
# ZSH PLUGINS (via Homebrew)
############################################
# Autosuggestions
[ -f /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh ] && \
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# Syntax Highlighting
[ -f /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ] && \
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# History Substring Search
[ -f /opt/homebrew/share/zsh-history-substring-search/zsh-history-substring-search.zsh ] && \
source /opt/homebrew/share/zsh-history-substring-search/zsh-history-substring-search.zsh
############################################
# HISTORIA / TECLAS / TERMINAL
############################################
setopt histignorealldups
setopt sharehistory
setopt incappendhistory
setopt histfindnodups
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
autoload -Uz compinit && compinit
############################################
# DOWNLOAD FOLDERS
############################################
export YT_VIDEO_DIR="$HOME/downloads/youtube/video"
export YT_AUDIO_DIR="$HOME/downloads/youtube/audio"
mkdir -p "$YT_VIDEO_DIR"
mkdir -p "$YT_AUDIO_DIR"
############################################
# FUNCIONES AVANZADAS YT-DLP
############################################
# Descargar video
ytv() {
yt-dlp \
--embed-thumbnail \
--embed-metadata \
-f "bestvideo+bestaudio" \
-o "$YT_VIDEO_DIR/%(title)s.%(ext)s" \
"$@"
}
# Descargar música mp3 con portada e ID3
ytm() {
yt-dlp \
-x --audio-format mp3 \
--embed-thumbnail \
--embed-metadata \
-o "$YT_AUDIO_DIR/%(title)s.%(ext)s" \
"$@"
}
# Descargar playlist completa (video)
ytvlist() {
yt-dlp \
--yes-playlist \
--embed-thumbnail \
--embed-metadata \
-o "$YT_VIDEO_DIR/%(playlist)s/%(title)s.%(ext)s" \
"$@"
}
# Descargar playlist completa (audio)
ytmlist() {
yt-dlp \
--yes-playlist \
-x --audio-format mp3 \
--embed-thumbnail \
--embed-metadata \
-o "$YT_AUDIO_DIR/%(playlist)s/%(title)s.%(ext)s" \
"$@"
}
############################################
# DOCKER / LAZYDOCKER HELPERS
############################################
alias lzd="lazydocker"
alias dcu="docker compose up -d"
alias dcd="docker compose down"
alias dps="docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}'"
alias drm="docker rm -f"
alias dim="docker images"
############################################
# ALIASES BÁSICOS
############################################
alias cls="clear"
alias ll="ls -lah"
############################################
# MENU INTERACTIVO VANITY
############################################
vanity() {
echo ""
echo "============================================"
echo " VANITY TERMINAL MENU"
echo "============================================"
echo " yt-dlp:"
echo " ytv URL -> Descargar video"
echo " ytm URL -> Descargar música (mp3)"
echo " ytvlist URL -> Playlist completa (video)"
echo " ytmlist URL -> Playlist completa (audio)"
echo ""
echo " Docker / Server:"
echo " lzd -> LazyDocker"
echo " dcu -> docker compose up -d"
echo " dcd -> docker compose down"
echo " dps -> Lista de contenedores"
echo ""
echo " Varias:"
echo " cls -> limpiar pantalla"
echo " ll -> listado"
echo "============================================"
echo ""
}
############################################
# PATH
############################################
export PATH="/opt/homebrew/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
############################################
# EDITOR DEFAULT
############################################
export EDITOR="nano"
############################################
# FIN
############################################