chore: clean up dotfiles and add gitignore whitelist
Switch to whitelist-based .gitignore to only track essential configs: nvim, yazi, kitty, zsh, ideavim, karabiner, tmux, scripts, starship. Remove history, compiled files, and plugin dirs from tracking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
54
zsh/.zshrc
54
zsh/.zshrc
@@ -16,6 +16,9 @@ export MANPAGER="nvim +Man!"
|
||||
|
||||
## Use IINA CLI
|
||||
export YTFZF_PLAYER="iina"
|
||||
|
||||
# Doom Emacs
|
||||
export PATH="$HOME/.emacs.d/bin:$PATH"
|
||||
# }}}
|
||||
|
||||
# # ~/.config/secrets/.env
|
||||
@@ -23,14 +26,27 @@ for f in ~/.config/secrets/.env; do
|
||||
export $(grep -v '^#' "$f" | xargs)
|
||||
done
|
||||
|
||||
# Prompt engine toggle {{{
|
||||
# 1 = Starship, 0 = Powerlevel10k
|
||||
export USE_STARSHIP=1
|
||||
# }}}
|
||||
|
||||
# Load Oh My Zsh {{{
|
||||
export ZSH="$XDG_CONFIG_HOME/.oh-my-zsh" # set path to Oh My Zsh
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k" # set theme to Powerlevel10k BEFORE loading Oh My Zsh
|
||||
if [[ "$USE_STARSHIP" == "1" ]]; then
|
||||
ZSH_THEME="" # disable OMZ theme when using starship
|
||||
else
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
fi
|
||||
source $ZSH/oh-my-zsh.sh # load Oh My Zsh framework (plugins, completions, themes)
|
||||
# }}}
|
||||
|
||||
# Theme and prompt {{{
|
||||
source $XDG_CONFIG_HOME/p10k/.p10k.zsh # load Powerlevel10k configuration
|
||||
if [[ "$USE_STARSHIP" == "1" ]]; then
|
||||
eval "$(starship init zsh)"
|
||||
else
|
||||
source $XDG_CONFIG_HOME/p10k/.p10k.zsh # load Powerlevel10k configuration
|
||||
fi
|
||||
# }}}
|
||||
|
||||
# ZSH Plugins {{{
|
||||
@@ -47,6 +63,17 @@ export KEYTIMEOUT=1 # make ESC faster when using vi keybindings
|
||||
# }}}
|
||||
|
||||
# Aliases and Functions {{{
|
||||
alias openclaw='/Users/thomasnaderer/.nvm/versions/node/v22.22.0/bin/node /Users/thomasnaderer/.nvm/versions/node/v22.22.0/bin/openclaw'
|
||||
openclaw_tui() {
|
||||
local token
|
||||
token="$(jq -r '.gateway.auth.token // empty' "$HOME/.openclaw/openclaw.json" 2>/dev/null)"
|
||||
if [ -z "$token" ]; then
|
||||
echo "openclaw_tui: missing gateway token in ~/.openclaw/openclaw.json"
|
||||
return 1
|
||||
fi
|
||||
OPENCLAW_GATEWAY_TOKEN="$token" openclaw tui --token "$token" "$@"
|
||||
}
|
||||
alias octui='openclaw_tui'
|
||||
alias wfy="ssh ftp5794822\@www76.world4you.com"
|
||||
alias h="cd ~" # go to home folder
|
||||
alias f="open ." # open current folder in Finder
|
||||
@@ -56,6 +83,7 @@ alias tni="cd /Volumes/ipec/intern" # quick cd to mounted volume intern
|
||||
alias l='eza --color=always --icons -la --group-directories-first' # fancy ls with icons and sorting
|
||||
alias n='nvim' # shortcut for Neovim
|
||||
alias m='neomutt' # open Neomutt mail client
|
||||
alias tm='tmux' # open Tmux Terminal Multiplexer
|
||||
|
||||
# Quick Access to Config Files
|
||||
alias ne='nvim ~/.zshenv' # edit global zshenv
|
||||
@@ -79,15 +107,14 @@ alias g='git' # shorthand for git
|
||||
alias gs='git status' # git status
|
||||
alias gc='git commit' # git commit
|
||||
alias gt='git log --oneline --graph --decorate --all' # git log in graph(tree) format
|
||||
alias lg='lazygit' # open Lazygit
|
||||
|
||||
# Docker
|
||||
alias ld='lazydocker' # open Lazydocker
|
||||
|
||||
# Scripts
|
||||
alias mnt='sh $HOME/.config/scripts/tnmount.sh' # run tnmount.sh script
|
||||
|
||||
# Quick access to notes
|
||||
alias nt='nvim ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Privat/TODO.md' # open TODO list
|
||||
alias ne='nvim ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Privat/Einkaufsliste.md' # open shopping list
|
||||
alias nb='nvim ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Privat/Persönliches/Bucketlists/2025.md' # open 2025 bucket list
|
||||
|
||||
# Custom Functions
|
||||
# Start yazi with "y", and when you quit yazi, your shell will "cd" to the folder you navigated to in yazi
|
||||
function y() {
|
||||
@@ -103,10 +130,6 @@ function y() {
|
||||
}
|
||||
# }}}
|
||||
|
||||
# iTerm2 shell integration {{{
|
||||
source $XDG_CONFIG_HOME/iterm2/.iterm2_shell_integration.zsh # load iTerm2 shell integration (enables iTerm2 features)
|
||||
# }}}
|
||||
|
||||
# Conda initialize {{{
|
||||
# export PATH="/opt/homebrew/anaconda3/bin:$PATH" # commented out by conda initialize
|
||||
# >>> conda initialize >>>
|
||||
@@ -129,3 +152,12 @@ export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
|
||||
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
|
||||
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
# fzf + fd integration
|
||||
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
|
||||
# fzf shell integration (keybindings + completion)
|
||||
eval "$(fzf --zsh)"
|
||||
|
||||
Reference in New Issue
Block a user