Files
dotfiles/zsh/.zshrc
Thomas Naderer 9a589412c8 NVIM
- adapting Transparency from Terminal
YAZI
    - Keymaps for work related folders
ZSH
    - updated aliases
2025-01-03 13:13:25 +01:00

58 lines
1.5 KiB
Bash

# Enable Powerlevel10k instant prompt {{{
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
POWERLEVEL9K_INSTANT_PROMPT=quiet
# }}}
# Load Oh My Zsh {{{
export ZSH="$XDG_CONFIG_HOME/.oh-my-zsh"
source $ZSH/oh-my-zsh.sh
# }}}
# Theme and prompt {{{
ZSH_THEME="powerlevel10k/powerlevel10k"
source $XDG_CONFIG_HOME/p10k/.p10k.zsh
# }}}
# ZSH Plugins {{{
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
eval "$(zoxide init zsh)"
# }}}
# Keybindings {{{
bindkey -v
export KEYTIMEOUT=1
# }}}
# 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'
# 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'
# Custom Functions
# Start yazi with y, and make it cd to pwd on quit
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
# }}}
# iTerm2 shell integration {{{
source $XDG_CONFIG_HOME/iterm2/.iterm2_shell_integration.zsh
# }}}