dotfiles/dot_zshrc.tmpl

91 lines
2.3 KiB
Cheetah
Raw Normal View History

2023-10-25 06:25:33 +00:00
{{- if eq .chezmoi.os "darwin" }}
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_CACHE_HOME="$HOME/Library/Caches"
export XDG_DATA_HOME="$HOME/Library"
export XDG_STATE_HOME="$HOME/Library/state"
{{- else if eq .chezmoi.os "linux" }}
2024-06-20 19:03:35 +00:00
export GIT_AGE_AGENT_HOST="unix:///run/user/1000/git-age-keyring-agent.sock"
2023-10-25 06:25:33 +00:00
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_CACHE_HOME=$HOME/.cache
export XDG_DATA_HOME=$HOME/.local/share
export XDG_STATE_HOME=$HOME/.local/state
{{end}}
export ZSH_CACHE_DIR="$XDG_CACHE_HOME/zsh"
2023-10-10 20:22:26 +00:00
{{- if eq .chezmoi.os "darwin" }}
2024-06-18 15:43:37 +00:00
export PATH="$PATH:/opt/homebrew/bin:/Applications/Xcode.app/Contents/Developer/usr/bin"
2023-10-10 20:22:26 +00:00
{{- end }}
# scripts from ~/bin
export PATH="$PATH:$HOME/.local/bin"
2023-12-06 07:45:59 +00:00
# export PINENTRY_USER_DATA="USE_CURSES=1"
export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
2023-12-06 08:02:03 +00:00
gpg-connect-agent updatestartuptty /bye > /dev/null
2023-12-06 07:45:59 +00:00
2024-01-17 18:42:00 +00:00
{{ if eq .chezmoi.os "darwin" -}}
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
bindkey "ç" fzf-cd-widget
{{- end }}
2023-12-11 16:10:13 +00:00
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
2023-10-10 20:22:26 +00:00
macchina
# Cargo env
if [ -d $HOME/.cargo/bin ]; then
export PATH="$PATH:$HOME/.cargo/bin"
fi
# Go
if [ -d /usr/local/go/bin ]; then
export PATH="$PATH:/usr/local/go/bin"
fi
export PATH="$PATH:$HOME/go/bin"
2024-10-30 18:35:23 +00:00
# Cargo
if [ -d "$HOME/.cargo/bin" ]; then
export PATH="$PATH:$HOME/.cargo/bin"
fi
2023-10-10 20:22:26 +00:00
# Yarn
if [ -d $HOME/.yarn/bin ]; then
export PATH="$PATH:$HOME/.yarn/bin"
fi
# Jetbrains Toolbox
{{- if eq .chezmoi.os "darwin" }}
if [ -d "$HOME/Library/Application Support/JetBrains/Toolbox/scripts" ]; then
export PATH="$PATH:$HOME/Library/Application Support/JetBrains/Toolbox/scripts"
fi
{{- else if eq .chezmoi.os "linux" }}
if [ -d "$HOME/.local/share/JetBrains/Toolbox/scripts" ]; then
export PATH="$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts"
fi
{{- end }}
# Dotnet
if [ -d $HOME/.dotnet/sdk ]; then
export DOTNET_ROOT=$HOME/.dotnet
export PATH="$PATH:$DOTNET_ROOT"
elif [ -d /usr/local/dotnet/sdk ]; then
export DOTNET_ROOT=/usr/local/dotnet
export PATH="$PATH:/usr/local/dotnet"
fi
export PATH="$PATH:$HOME/.dotnet/tools"
# Znap
2023-10-25 06:25:33 +00:00
export ZNAP_HOME="$XDG_DATA_HOME/znap"
2023-10-10 20:22:26 +00:00
2023-10-25 06:25:33 +00:00
for file in $XDG_CONFIG_HOME/zsh/*.zsh; do
2023-10-10 20:22:26 +00:00
source "$file"
done
2023-12-06 08:02:03 +00:00
znap eval starship 'starship init zsh --print-full-init'
znap prompt