Instantly share code, notes, and snippets.

Embed
What would you like to do?
ubuntu zsh installation with customized powerlevel theme
#!/usr/bin/env bash
echo ">>> Install Oh-My-ZSH"
sudo apt-get install -y zsh
wget http://install.ohmyz.sh -O - | zsh
echo ">>> Install powerlevel9k theme"
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="powerlevel9k\/powerlevel9k"/' ~/.zshrc
echo ">>> Install Z"
git clone https://github.com/rupa/z.git
mv z/z.sh ~/.z.sh
touch ~/.z
rm -rf z
echo ">>> Install zsh-autocomplete"
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/zsh-autosuggestions
sed -i 's/plugins=\(git\)/plugins=\(git zsh-autosuggestions\)/' ~/.zshrc
echo ">>> Activate Z and update powerlevel9k config"
cat >> ~/.zshrc << EOF
# Enable Z
. ~/.z.sh
# POWERLEVEL9K SETTINGS #
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(load ram)
POWERLEVEL9K_DISABLE_RPROMPT=true
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
EOF
sudo chsh -s $(which zsh) `whoami`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment