diff --git a/zsh/.zshrc b/zsh/.zshrc index caf3827..8e2a61e 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,3 +1,7 @@ +if [[ -z "${XDG_CONFIG_HOME}" ]]; then + source ~/.profile +fi + # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. @@ -65,7 +69,26 @@ zle -N down-line-or-beginning-search zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*' autoload -Uz compinit && compinit -source /etc/profile.d/autojump.zsh + +if [ -f "/usr/share/autojump/autojump.sh" ]; then + source /usr/share/autojump/autojump.sh +elif [ -f "/etc/profile.d/autojump.zsh" ]; then + source /etc/profile.d/autojump.zsh +fi + +if [ -f "/usr/share/doc/pkgfile/command-not-found.zsh" ]; then + source /usr/share/doc/pkgfile/command-not-found.zsh +fi + +#FZF +if [ -f "/usr/share/doc/fzf/examples/key-bindings.zsh" ]; then + source /usr/share/doc/fzf/examples/key-bindings.zsh + source /usr/share/doc/fzf/examples/completion.zsh +elif [ -f "/usr/share/fzf/key-bindings.zsh" ]; then + source /usr/share/fzf/key-bindings.zsh + source /usr/share/fzf/completion.zsh +fi + autoload -Uz compinit compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" @@ -78,8 +101,6 @@ source $XDG_CONFIG_HOME/zsh/powerlevel10k/powerlevel10k.zsh-theme # To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh. [[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh -source /usr/share/doc/pkgfile/command-not-found.zsh - # Preferred editor for local and remote sessions # if [[ -n $SSH_CONNECTION ]]; then # else @@ -120,9 +141,6 @@ export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quo export LANG=en_US.UTF-8 -#FZF -source /usr/share/fzf/key-bindings.zsh -source /usr/share/fzf/completion.zsh export TERM="screen-256color" # Unity Development @@ -134,15 +152,15 @@ export PATH=$HOME/.local/bin:$PATH # >>> mamba initialize >>> # !! Contents within this block are managed by 'mamba init' !! export MAMBA_EXE="/usr/bin/micromamba"; -export MAMBA_ROOT_PREFIX="/home/user/.micromamba"; -__mamba_setup="$('/usr/bin/micromamba' shell hook --shell zsh --prefix '/home/user/.micromamba' 2> /dev/null)" +export MAMBA_ROOT_PREFIX="$HOME/.micromamba"; +__mamba_setup="$('/usr/bin/micromamba' shell hook --shell zsh --prefix '$HOME/.micromamba' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__mamba_setup" else - if [ -f "/home/user/.micromamba/etc/profile.d/micromamba.sh" ]; then - . "/home/user/.micromamba/etc/profile.d/micromamba.sh" + if [ -f "$HOME/.micromamba/etc/profile.d/micromamba.sh" ]; then + . "$HOME/.micromamba/etc/profile.d/micromamba.sh" else - export PATH="/home/user/.micromamba/bin:$PATH" # extra space after export prevents interference from conda init + export PATH="$HOME/.micromamba/bin:$PATH" # extra space after export prevents interference from conda init fi fi unset __mamba_setup @@ -178,3 +196,4 @@ alias compress="tar --use-compress-program=lbzip2 -cvf" alias vim="nvim" alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts" alias xbindkeys="xbindkeys -f $XDG_CONFIG_HOME/xbindkeys/config" +alias python=python3