Skip to content

Instantly share code, notes, and snippets.

@tscheckenbach
Last active June 2, 2023 16:09
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tscheckenbach/b9d61384833ccac8d072 to your computer and use it in GitHub Desktop.
Save tscheckenbach/b9d61384833ccac8d072 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash
echo ">>> Install powerlevel10k theme"
git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="powerlevel10k\/powerlevel10k"/' ~/.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 powerlevel10k config"
cat >> ~/.zshrc << EOF
# Enable Z
. ~/.z.sh
# POWERLEVEL10K SETTINGS #
POWERLEVEL10K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs)
POWERLEVEL10K_RIGHT_PROMPT_ELEMENTS=(load ram)
POWERLEVEL10K_DISABLE_RPROMPT=true
POWERLEVEL10K_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