unix-config/.zshrc

68 lines
2.1 KiB
Bash

# Path
if [[ $(uname) == "Darwin" ]]; then
if [[ $(uname -m) == 'arm64' ]]; then
# Homebrew has a different location on M series devices
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH:${HOME}/.local/bin:/usr/local/sbin:${HOME}/.local/share/gem/ruby/2.0.0/bin:/usr/local/bin"
export ANDROID_SDK_ROOT=/Users/$USER/Library/Android/sdk
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
alias date=gdate;
eval "$(rbenv init - zsh)"
else
export PATH="${PATH}:${HOME}/.local/bin:/usr/local/sbin:${HOME}/.local/share/gem/ruby/2.0.0/bin:/usr/local/bin"
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
fi
export CONFIGDIR="${HOME}/.config"
export XDG_CONFIG_HOME=$CONFIGDIR
export EDITOR=nvim
# oh-my-zsh
export ZSH_DIR="$CONFIGDIR/ohmyzsh"
export ZSH_CUSTOM="$ZSH_DIR/custom"
export ZSH="$CONFIGDIR/ohmyzsh"
plugins=(git-prompt git)
source $ZSH/oh-my-zsh.sh
# Use NVIM
alias vim=nvim
# NVM
export NVM_DIR="$CONFIGDIR/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Autocomplete
ZSH_AUTOSUGGEST_USE_ASYNC=true
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
# Prompt
function precmd {
PROMPT="[%c] "
RPROMPT="$(git_super_status)"
}
# Added by serverless binary installer
export PATH="$HOME/.serverless/bin:$PATH"
# tabtab source for packages
# uninstall by removing these lines
[[ -f ~/.config/tabtab/__tabtab.zsh ]] && . ~/.config/tabtab/__tabtab.zsh || true
# Nodejs
export SKIP_PREFLIGHT_CHECK=true
# FZF
export FZF_DEFAULT_COMMAND='find . -type d \( -name Pods -o -name .yarn -o -name node_modules -o -name .git -o -path name \) -prune -false -o -name "*"'
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
source ~/.config/scripts/scripts.sh
# thefuck
eval $(thefuck --alias)
alias a=fuck