Skip to content

Instantly share code, notes, and snippets.

@ScottJWalter
Last active April 12, 2025 22:58
Show Gist options
  • Save ScottJWalter/668d237369189455e7bf28173acd6c07 to your computer and use it in GitHub Desktop.
Save ScottJWalter/668d237369189455e7bf28173acd6c07 to your computer and use it in GitHub Desktop.
Install collection of zsh things
#!/bin/bash
declare -a PLUGINS=(
"djui/alias-tips"
"zdharma-continuum/fast-syntax-highlighting"
"zsh-users/zsh-autosuggestions"
"zsh-users/zsh-completions"
"akarzim/zsh-docker-aliases"
"z-shell/zsh-eza"
"MichaelAquilina/zsh-you-should-use"
)
PLUGIN_ROOT=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins
# zsh plugins
install_plugins() {
echo Installing plugins...
local installed=()
for plugin in "${PLUGINS[@]}"; do
local repo=($(echo $plugin | tr "/" " "))
if [ ! -d ${PLUGIN_ROOT}/${repo[1]} ]; then
git clone https://github.com/${repo[0]}/${repo[1]} ${PLUGIN_ROOT}/${repo[1]}
installed+=( ${repo[1]} )
fi
done
echo
echo Done! Remember to add:
echo
for plugin in "${installed[@]}"; do
echo ${plugin}
done
echo
echo to your plugins array in .zshrc
}
# oh my zsh
install_ohmyzsh() {
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
}
install_theme() {
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
}
#install_ohmyzsh
install_plugins
install_theme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment