Fix Yazi shell integration and enhance Kitty configuration
**Yazi Integration Fixes:** - Fixed y() function in .zshrc to prevent shell exit when quitting Yazi - Updated kitty-yazi.sh script to use AppleScript for proper tab creation - Script now focuses existing Kitty window and creates new tab instead of new window **Kitty Configuration Enhancements:** - Added advanced font rendering with ligature support - Improved cursor animations and visual effects - Enhanced tab bar with powerline styling and fade effects - Added background blur and better transparency handling - Optimized performance settings (rendering delays, scrolling) - Added comprehensive keyboard shortcuts for window/tab management - Improved URL handling and text selection features - Added notification system for long-running commands 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
118
zsh/.zshrc
118
zsh/.zshrc
@@ -1,60 +1,120 @@
|
||||
# vim:fileencoding=utf-8:foldmethod=marker
|
||||
|
||||
# Enable Powerlevel10k instant prompt {{{
|
||||
# Loads the instant prompt to make the shell feel fast (part of powerlevel10k)
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
POWERLEVEL9K_INSTANT_PROMPT=quiet
|
||||
POWERLEVEL9K_INSTANT_PROMPT=quiet # run instant prompt quietly
|
||||
# }}}
|
||||
|
||||
# Environment variables {{{
|
||||
export MYVIMRC="$HOME/.config/nvim/init.lua" # define MYVIMRC variable so you can use $MYVIMRC to access your init.lua
|
||||
# }}}
|
||||
|
||||
# Load Oh My Zsh {{{
|
||||
export ZSH="$XDG_CONFIG_HOME/.oh-my-zsh"
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
export ZSH="$XDG_CONFIG_HOME/.oh-my-zsh" # set path to Oh My Zsh
|
||||
source $ZSH/oh-my-zsh.sh # load Oh My Zsh framework (plugins, completions, themes)
|
||||
# }}}
|
||||
|
||||
# Theme and prompt {{{
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
source $XDG_CONFIG_HOME/p10k/.p10k.zsh
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k" # set theme to Powerlevel10k
|
||||
source $XDG_CONFIG_HOME/p10k/.p10k.zsh # load Powerlevel10k configuration
|
||||
# }}}
|
||||
|
||||
# ZSH Plugins {{{
|
||||
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
|
||||
eval "$(zoxide init zsh)"
|
||||
plugins=(git zsh-autosuggestions zsh-syntax-highlighting) # enable git support, autosuggestions and syntax highlighting
|
||||
eval "$(zoxide init zsh)" # enable zoxide for fast directory jumping
|
||||
# }}}
|
||||
|
||||
# Keybindings {{{
|
||||
bindkey -v
|
||||
export KEYTIMEOUT=1
|
||||
bindkey -v # enable vi-style keybindings
|
||||
export KEYTIMEOUT=1 # make ESC faster when using vi keybindings
|
||||
# }}}
|
||||
|
||||
# Aliases and Functions {{{
|
||||
# Aliases
|
||||
alias h="cd ~"
|
||||
alias cl="clear"
|
||||
alias tnh="cd /Volumes/AK127132"
|
||||
alias tng="cd /Volumes/intern"
|
||||
alias l='eza --color=always --icons -la --group-directories-first'
|
||||
alias n='nvim'
|
||||
alias ne='nvim ~/.zshenv'
|
||||
alias nz='nvim ~/.config/zsh/.zshrc'
|
||||
alias g='git'
|
||||
alias gs='git status'
|
||||
alias gc='git commit'
|
||||
alias wfy="ssh ftp5794822\@www76.world4you.com"
|
||||
alias h="cd ~" # go to home folder
|
||||
alias f="open ." # open current folder in Finder
|
||||
alias cl="clear" # clear terminal screen
|
||||
alias tnh="cd /Volumes/AK127132" # quick cd to mounted volume AK127132
|
||||
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
|
||||
|
||||
# Quick Access to Config Files
|
||||
alias ne='nvim ~/.zshenv' # edit global zshenv
|
||||
alias nz='nvim ~/.config/zsh/.zshrc' # edit this zshrc
|
||||
|
||||
alias nni='nvim ~/.config/nvim/init.lua' # edit Neovim init.lua
|
||||
alias sni='source ~/.config/nvim/init.lua' # source Neovim init.lua
|
||||
alias nnp='nvim ~/.config/nvim/lua/plugins/init.lua' # edit main plugins file
|
||||
alias nnk='nvim ~/.config/nvim/lua/keymaps.lua' # edit keymaps.lua
|
||||
alias nns='nvim ~/.config/nvim/lua/settings.lua' # edit settings.lua
|
||||
|
||||
alias ny='nvim ~/.config/yazi/yazi.toml' # edit Yazi config
|
||||
alias nyk='nvim ~/.config/yazi/keymap.toml' # edit Yazi keymap config
|
||||
|
||||
alias nk='nvim ~/.config/kitty/kitty.conf' # edit Kitty terminal config
|
||||
alias nkk='nvim ~/.config/kitty/keymap.conf' # edit Kitty keymap config
|
||||
|
||||
# Git
|
||||
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
|
||||
|
||||
# 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'
|
||||
alias ne='nvim ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Privat/Einkaufsliste.md'
|
||||
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 make it cd to pwd on quit
|
||||
# Start yazi with "y", and when you quit yazi, your shell will "cd" to the folder you navigated to in yazi
|
||||
function y() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
|
||||
yazi "$@" --cwd-file="$tmp"
|
||||
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||
builtin cd -- "$cwd"
|
||||
if [ -f "$tmp" ]; then
|
||||
local cwd="$(cat "$tmp")"
|
||||
if [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||
cd "$cwd"
|
||||
fi
|
||||
fi
|
||||
rm -f -- "$tmp"
|
||||
}
|
||||
# }}}
|
||||
|
||||
# iTerm2 shell integration {{{
|
||||
source $XDG_CONFIG_HOME/iterm2/.iterm2_shell_integration.zsh
|
||||
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 >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('/opt/homebrew/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup" # conda properly initialized
|
||||
else
|
||||
if [ -f "/opt/homebrew/anaconda3/etc/profile.d/conda.sh" ]; then
|
||||
. "/opt/homebrew/anaconda3/etc/profile.d/conda.sh" # fallback to sourcing conda profile
|
||||
else
|
||||
export PATH="/opt/homebrew/anaconda3/bin:$PATH" # fallback: manually add conda to path
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
# <<< conda initialize <<<
|
||||
# }}}
|
||||
|
||||
# OpenAI API Key {{{
|
||||
export OPENAI_API_KEY="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" # OpenAI API key for ChatGPT or API access
|
||||
# }}}
|
||||
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user