Last active
June 2, 2023 16:09
-
-
Save tscheckenbach/b9d61384833ccac8d072 to your computer and use it in GitHub Desktop.
ubuntu zsh installation with customized powerlevel theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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