2018-05-28 01:11:16 +00:00
|
|
|
# add ~/bin & /usr/local/bin to $PATH
|
|
|
|
export PATH=$HOME/bin:/usr/local/bin:$PATH
|
|
|
|
|
2019-04-22 17:53:12 +00:00
|
|
|
# OS detection
|
|
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
|
|
# macOS
|
2019-04-27 01:56:23 +00:00
|
|
|
# Path to your oh-my-zsh installation.
|
|
|
|
export ZSH=$HOME/.oh-my-zsh
|
|
|
|
|
2019-04-22 17:53:12 +00:00
|
|
|
# Support for XDG Base Directories
|
|
|
|
export XDG_DATA_HOME="${HOME}/.local/share"
|
|
|
|
export XDG_CONFIG_HOME="${HOME}/.config"
|
|
|
|
export XDG_CACHE_HOME="${HOME}/.cache"
|
|
|
|
export XDG_RUNTIME_DIR="/tmp"
|
|
|
|
elif [[ "$OSTYPE" == "linux-gnu" ]]; then
|
|
|
|
# Linux/GNU
|
|
|
|
# Path to your oh-my-zsh installation.
|
|
|
|
export ZSH=/usr/share/oh-my-zsh
|
2019-04-27 01:56:23 +00:00
|
|
|
|
|
|
|
# reduce linux syscalls
|
|
|
|
export TZ=:/etc/localtime
|
2019-04-22 17:53:12 +00:00
|
|
|
else
|
|
|
|
printf "Unknown OS detected: %s\n" "$OSTYPE"
|
|
|
|
fi
|
|
|
|
|
2018-07-23 00:41:36 +00:00
|
|
|
# oh-my-zsh related directories
|
|
|
|
export ZSH_CACHE_DIR=$XDG_CACHE_HOME/oh-my-zsh
|
|
|
|
export ZSH_CUSTOM=$XDG_CONFIG_HOME/oh-my-zsh/custom
|
|
|
|
|
|
|
|
# create cache & plugin directories if they don't exist
|
|
|
|
if [[ ! -d $ZSH_CACHE_DIR ]]; then
|
|
|
|
mkdir -p $ZSH_CACHE_DIR
|
|
|
|
fi
|
|
|
|
if [[ ! -d $ZSH_CUSTOM ]]; then
|
|
|
|
mkdir -p $ZSH_CUSTOM
|
2018-07-24 07:38:34 +00:00
|
|
|
fi
|
2018-07-23 00:41:36 +00:00
|
|
|
|
|
|
|
# disable automatic updates
|
|
|
|
DISABLE_AUTO_UPDATE=true
|
2016-01-23 00:58:21 +00:00
|
|
|
|
2016-11-21 20:47:18 +00:00
|
|
|
# theme
|
|
|
|
ZSH_THEME="ys"
|
2016-01-23 00:58:21 +00:00
|
|
|
|
2016-11-21 20:47:18 +00:00
|
|
|
# plugins
|
2018-05-28 01:11:16 +00:00
|
|
|
plugins=(
|
2019-04-22 17:46:59 +00:00
|
|
|
ripgrep
|
2018-05-28 01:11:16 +00:00
|
|
|
git
|
|
|
|
sudo
|
|
|
|
)
|
2016-01-23 00:58:21 +00:00
|
|
|
|
2016-11-21 20:47:18 +00:00
|
|
|
# zsh-completions
|
2016-01-23 00:58:21 +00:00
|
|
|
autoload -U compinit && compinit
|
|
|
|
|
2016-11-21 20:47:18 +00:00
|
|
|
# source omz
|
2016-01-23 00:58:21 +00:00
|
|
|
source $ZSH/oh-my-zsh.sh
|
2017-02-19 23:59:27 +00:00
|
|
|
|