| 1 | #!/bin/bash |
| 2 | # Based on: |
| 3 | # https://github.com/Powerlevel9k/powerlevel9k/wiki/Install-Instructions |
| 4 | # https://github.com/ohmyzsh/ohmyzsh |
| 5 | # https://powerline.readthedocs.io/en/latest/installation/linux.html#fonts-installation |
| 6 | # https://gist.github.com/dogrocker/1efb8fd9427779c827058f873b94df95 |
| 7 | # https://linuxhint.com/install_zsh_shell_ubuntu_1804/ |
| 8 | |
| 9 | echo "*********************************************" |
| 10 | echo " zsh fancifier" |
| 11 | echo "*********************************************" |
| 12 | echo "" |
| 13 | echo "1. Installing oh-my-zsh..." |
| 14 | sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
| 15 | |
| 16 | echo "" |
| 17 | echo "2. Installing powerline fonts..." |
| 18 | wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf |
| 19 | wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf |
| 20 | mkdir -p ~/.local/share/fonts/ |
| 21 | mv PowerlineSymbols.otf ~/.local/share/fonts/ |
| 22 | fc-cache -vf ~/.local/share/fonts/ |
| 23 | mkdir -p ~/.config/fontconfig/conf.d/ |
| 24 | mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/ |
| 25 | |
| 26 | echo "" |
| 27 | echo "3. Installing powerlevel10k theme ..." |
| 28 | git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k |
| 29 | # legacy them powerlevel9k |
| 30 | # git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k |
| 31 | sed -i 's@^ZSH_THEME=.*$@ZSH_THEME="powerlevel10k/powerlevel10k"@g' ~/.zshrc |
| 32 | |
| 33 | echo "" |
| 34 | echo "4. Installing autosuggestions and syntax highlighting..." |
| 35 | git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions |
| 36 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting |
| 37 | sed -i 's@plugins=(git)@plugins=(git zsh-autosuggestions zsh-syntax-highlighting)@g' ~/.zshrc |
| 38 | |
| 39 | echo "" |
| 40 | echo "Finish! Log out of your session and login again." |
anthony / Install zsh / oh-my-zsh / Powerlevel10k on Ubuntu 20.04
Last active 3 months ago
Revision e6e6b49fa11c3c4bb86586f8d3572fb809fb2560
| 1 | #!/bin/bash |
| 2 | echo "*********************************************" |
| 3 | echo " zsh installer (vanilla)" |
| 4 | echo "*********************************************" |
| 5 | sudo apt-get update |
| 6 | sudo apt-get install zsh -y |
| 7 | chsh -s $(which zsh) |
| 8 | |
| 9 | echo "" |
| 10 | echo "Finish! Log out of your session and login again. Then run zsh-fancify.sh" |