mirror of
https://github.com/marcogll/mac_vntySet.git
synced 2026-01-13 21:35:15 +00:00
Update .zshrc.example
This commit is contained in:
223
.zshrc.example
223
.zshrc.example
@@ -1,88 +1,189 @@
|
|||||||
# ----------------------------------------------------
|
############################################
|
||||||
# VANITY ZSH CONFIG – macOS + Oh My Zsh + Oh My Posh
|
# OH MY ZSH
|
||||||
# ----------------------------------------------------
|
############################################
|
||||||
|
|
||||||
# Homebrew PATH (Apple Silicon)
|
|
||||||
/opt/homebrew/bin:/opt/homebrew/sbin:$PATH
|
|
||||||
|
|
||||||
# Oh My Zsh installation directory
|
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
||||||
ZSH_THEME="robbyrussell"
|
ZSH_THEME="robbyrussell"
|
||||||
|
|
||||||
plugins=(
|
plugins=(
|
||||||
git
|
git
|
||||||
macos
|
docker
|
||||||
zsh-autosuggestions
|
|
||||||
zsh-syntax-highlighting
|
|
||||||
)
|
)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
# Idioma
|
|
||||||
export LANG="en_US.UTF-8"
|
|
||||||
export LC_ALL="en_US.UTF-8"
|
|
||||||
|
|
||||||
# Editor
|
############################################
|
||||||
export EDITOR="nvim"
|
# OH MY POSH (Catppuccin)
|
||||||
|
############################################
|
||||||
|
|
||||||
# Prompt con Oh My Posh (Catppuccin)
|
eval "$(oh-my-posh init zsh --config ~/.poshthemes/catppuccin.omp.json)"
|
||||||
eval "$(oh-my-posh init zsh --config ~/catppuccin.omp.json)"
|
|
||||||
|
|
||||||
# Compinit
|
|
||||||
autoload -Uz compinit
|
|
||||||
compinit
|
|
||||||
|
|
||||||
# Opciones del shell
|
############################################
|
||||||
setopt auto_cd
|
# MODULAR CONFIG (~/.config/zsh)
|
||||||
setopt interactive_comments
|
############################################
|
||||||
setopt correct
|
|
||||||
setopt extended_history
|
|
||||||
|
|
||||||
# Historial
|
mkdir -p ~/.config/zsh
|
||||||
export HISTFILE=~/.zsh_history
|
|
||||||
export HISTSIZE=50000
|
|
||||||
export SAVEHIST=50000
|
|
||||||
|
|
||||||
# Colores ls
|
# Cargar módulos si existen
|
||||||
export CLICOLOR=1
|
for f in ~/.config/zsh/*.zsh; do
|
||||||
export LSCOLORS=ExFxCxDxBxegedabagacad
|
[ -r "$f" ] && source "$f"
|
||||||
|
done
|
||||||
|
|
||||||
# Paths adicionales
|
|
||||||
fpath+=/opt/homebrew/share/zsh/site-functions
|
|
||||||
|
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
############################################
|
||||||
export PATH="$HOME/Library/Python/3.11/bin:$PATH"
|
# ZSH PLUGINS (via Homebrew)
|
||||||
export PATH="$HOME/.npm-global/bin:$PATH"
|
############################################
|
||||||
|
|
||||||
# -------------------------------------------
|
# Autosuggestions
|
||||||
# ALIASES
|
[ -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 cls="clear"
|
||||||
alias ll="ls -lah"
|
alias ll="ls -lah"
|
||||||
alias brewfix="brew update && brew upgrade && brew cleanup"
|
|
||||||
|
|
||||||
# Descarga de YouTube
|
|
||||||
alias ytv='yt-dlp -o "~/Downloads/youtube/video/%(title)s.%(ext)s"'
|
|
||||||
alias ytm='yt-dlp -x --audio-format mp3 -o "~/Downloads/youtube/audio/%(title)s.%(ext)s"'
|
|
||||||
|
|
||||||
# -------------------------------------------
|
############################################
|
||||||
# HELP: listado de comandos Vanity
|
# MENU INTERACTIVO VANITY
|
||||||
# -------------------------------------------
|
############################################
|
||||||
alias help='echo "
|
|
||||||
VANITY TERMINAL COMMANDS
|
|
||||||
|
|
||||||
General:
|
vanity() {
|
||||||
cls — limpiar pantalla
|
echo ""
|
||||||
ll — listar archivos con detalles
|
echo "============================================"
|
||||||
brewfix — actualizar y limpiar Homebrew
|
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 ""
|
||||||
|
}
|
||||||
|
|
||||||
YouTube Downloads:
|
|
||||||
ytv <URL> — descargar VIDEO en ~/Downloads/youtube/video
|
|
||||||
ytm <URL> — descargar AUDIO (MP3) en ~/Downloads/youtube/audio
|
|
||||||
|
|
||||||
Shell & Prompt:
|
############################################
|
||||||
oh-my-posh — gestor de prompt
|
# PATH
|
||||||
oh-my-zsh — framework de Zsh
|
############################################
|
||||||
"'
|
|
||||||
|
export PATH="/opt/homebrew/bin:$PATH"
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
|
|
||||||
|
############################################
|
||||||
|
# EDITOR DEFAULT
|
||||||
|
############################################
|
||||||
|
|
||||||
|
export EDITOR="nano"
|
||||||
|
|
||||||
|
|
||||||
|
############################################
|
||||||
|
# FIN
|
||||||
|
############################################
|
||||||
|
|||||||
Reference in New Issue
Block a user