_script="$(realpath ${BASH_SOURCE[0]})" _scriptname="$(basename $_script)" _scriptdir="$(dirname $_script)" _modulename="$(basename $_scriptdir)" DOT_MODULE_NAME="i3" function preinstall() { if ! [[ -x "$(command -v zsh)" ]]; then PACKAGES+=("zsh") fi } function install() { if ! [[ -d "$HOME/.oh-my-zsh" ]]; then sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" fi if ! [[ -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]]; then git clone https://github.com/zsh-users/zsh-autosuggestions.git "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" else cd "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" && git pull fi if ! [[ -d "$HOME/.oh-my-zsh/custom/plugins/zsh-completions" ]]; then git clone https://github.com/zsh-users/zsh-completions.git "$HOME/.oh-my-zsh/custom/plugins/zsh-completions" else cd "$HOME/.oh-my-zsh/custom/plugins/zsh-completions" && git pull fi if ! [[ -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]]; then git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" else cd "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" && git pull fi ln -sf "$_scriptdir/zshrc" "$HOME/.zshrc" }