diff --git a/.zshrc b/.zshrc index 6864f3a..785ce84 100644 --- a/.zshrc +++ b/.zshrc @@ -1,5 +1,11 @@ -export ZSH="/home/digyx/.oh-my-zsh" +if [[ "$(uname)" == "Darwin" ]]; then + export ZSH="/Users/$(whoami)/.oh-my-zsh" +elif [[ "$(expr substr $(uname -s) 1 5)" == "Linux" ]]; then + export ZSH="/home/$(whoami)/.oh-my-zsh" +fi + ZSH_THEME="robbyrussell" +ZSH_DISABLE_COMPFIX="true" plugins=( git @@ -20,4 +26,3 @@ plugins=( ) source $ZSH/oh-my-zsh.sh - diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..3b8ae38 --- /dev/null +++ b/setup.sh @@ -0,0 +1,11 @@ +# Install ohmyzsh +sudo sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +sudo chown -R $(whoami) ~/.oh-my-zsh ~/.zshrc + +# Install thefuck, zsh-suggestion +sudo python3 -m pip install thefuck +git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions + +# Copy .zshrc file, setup z +cp .zshrc ~/.zshrc +touch ~/.z