zshrc: lazygit, delta, atuin, mise integriert

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
rene 2026-03-27 12:56:55 +01:00
parent 1ad4b02ab8
commit 5a9174d898

View file

@ -1,6 +1,6 @@
# ---------------------------------------------------------- # ----------------------------------------------------------
# Zsh-Konfiguration fuer Rene # Zsh-Konfiguration für René
# Oh My Zsh + Powerlevel10k + Micro # Oh My Zsh + Powerlevel10k + Micro + Conda
# ---------------------------------------------------------- # ----------------------------------------------------------
# 1) Powerlevel10k Instant Prompt (muss sehr weit oben stehen) # 1) Powerlevel10k Instant Prompt (muss sehr weit oben stehen)
@ -38,14 +38,18 @@ source "$ZSH/oh-my-zsh.sh"
# export LANG=de_DE.UTF-8 # export LANG=de_DE.UTF-8
# export LC_ALL=de_DE.UTF-8 # export LC_ALL=de_DE.UTF-8
# 5) Standard-Editor (lokal: micro, SSH-Session: nichts erzwingen) # 5) Standard-Editor (Mac lokal: micro, SSH-Session: nichts erzwingen)
if [[ -z "$SSH_CONNECTION" ]]; then if [[ -z "$SSH_CONNECTION" ]]; then
export EDITOR="micro" export EDITOR="micro"
export VISUAL="micro" export VISUAL="micro"
fi fi
# 6) Pfade erweitern # 6) Pfade erweitern
export PATH="$HOME/bin:$HOME/.local/bin:$HOME/.npm-global/bin:$HOME/.lmstudio/bin:$PATH"
# LM Studio CLI (bereits vorhanden, übernommen)
export PATH="$PATH:$HOME/.lmstudio/bin"
export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
# 7) Nützliche Aliases # 7) Nützliche Aliases
@ -71,8 +75,6 @@ alias gp='git push'
alias gl='git log --oneline --graph --decorate' alias gl='git log --oneline --graph --decorate'
alias gitcheck="~/git-check-all.sh --short" alias gitcheck="~/git-check-all.sh --short"
alias gitupdate="~/git-update-all.sh" alias gitupdate="~/git-update-all.sh"
alias gitsync="~/git-projekte/dotfiles-rene/bin/git-sync-all.sh"
alias mac-sync="curl -fsSL https://git.motocamp.de/rene/dotfiles-rene/raw/branch/main/bin/git-sync-all.sh | bash"
alias cb="pbpaste | sed 's/^ //' | pbcopy" alias cb="pbpaste | sed 's/^ //' | pbcopy"
# Ubuntu-Kompatibilitaet: fd und bat heissen dort anders # Ubuntu-Kompatibilitaet: fd und bat heissen dort anders
command -v fdfind &>/dev/null && ! command -v fd &>/dev/null && alias fd='fdfind' command -v fdfind &>/dev/null && ! command -v fd &>/dev/null && alias fd='fdfind'
@ -265,7 +267,32 @@ if [[ -o interactive ]] && command -v cowsay &>/dev/null; then
unfunction _greet unfunction _greet
fi fi
# 8) History alias gitsync="~/git-projekte/dotfiles-rene/bin/git-sync-all.sh"
alias mac-sync="curl -fsSL https://git.motocamp.de/rene/dotfiles-rene/raw/branch/main/bin/git-sync-all.sh | bash"
# 8) Conda-Initialisierung
# ----------------------------------------------------------
# Dieser Block wurde ursprünglich von `conda init` erzeugt.
# Wenn Conda-Updates irgendwann meckern, einfach erneut:
# conda init zsh
# laufen lassen.
# ----------------------------------------------------------
__conda_setup="$('/Users/rene/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/rene/miniconda3/etc/profile.d/conda.sh" ]; then
. "/Users/rene/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/rene/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# 9) Kleine Qualität-of-Life-Einstellungen für Zsh
# Bessere History
HISTFILE="$HOME/.zsh_history" HISTFILE="$HOME/.zsh_history"
HISTSIZE=5000 HISTSIZE=5000
SAVEHIST=5000 SAVEHIST=5000
@ -277,10 +304,29 @@ setopt SHARE_HISTORY # History zwischen mehreren Zsh-Sessions teilen
# Automatisches cd wenn nur ein Verzeichnisname eingegeben wird # Automatisches cd wenn nur ein Verzeichnisname eingegeben wird
setopt AUTO_CD setopt AUTO_CD
# 9) Prompt-Titel (Fenster-/Tab-Titel) # Autokorrektur bei Tippfehlern (optional, wenn es nervt, auskommentieren)
# setopt CORRECT
# 10) Prompt-Titel schön halten (Fenster-/Tab-Titel)
# Zeigt user@host:pfad an
precmd() { print -Pn "\e]0;%n@%m: %~\a" } precmd() { print -Pn "\e]0;%n@%m: %~\a" }
export COLORTERM=truecolor export COLORTERM=truecolor
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# 11) Tool-Integrationen
eval "$(atuin init zsh)"
eval "$(mise activate zsh)"
# delta als Git-Pager
git config --global core.pager delta
git config --global interactive.diffFilter "delta --color-only"
git config --global delta.navigate true
git config --global delta.side-by-side true
# lazygit Alias
alias lg='lazygit'
# claude-profiles-start # claude-profiles-start
alias claude-priv='CLAUDE_CONFIG_DIR=~/.claude-priv command claude' # mail@motocamp.de alias claude-priv='CLAUDE_CONFIG_DIR=~/.claude-priv command claude' # mail@motocamp.de
alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work command claude' # rene@rm202.de alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work command claude' # rene@rm202.de
@ -315,8 +361,8 @@ nvim-cheats() {
echo "gg/G : Anfang / Ende der Datei" echo "gg/G : Anfang / Ende der Datei"
echo ":Nr : Zur Zeilenummer Nr springen (z.B. :42)\n" echo ":Nr : Zur Zeilenummer Nr springen (z.B. :42)\n"
# LÖSCHEN # LÖSCHEN (Neu hinzugefügt)
echo -e "\e[1;33mLÖSCHEN & BEARBEITEN\e[0m" echo -e "\e[1;33mLÖSCHEN & BEARBEITEN\e[0m" # Gelb für Hervorhebung
echo "-------------------------------------------" echo "-------------------------------------------"
echo "dd : Ganze Zeile löschen" echo "dd : Ganze Zeile löschen"
echo "dw : Wort löschen" echo "dw : Wort löschen"