zsh-fancify.sh
· 1.8 KiB · Bash
Raw
#!/bin/bash
# Based on:
# https://github.com/Powerlevel9k/powerlevel9k/wiki/Install-Instructions
# https://github.com/ohmyzsh/ohmyzsh
# https://powerline.readthedocs.io/en/latest/installation/linux.html#fonts-installation
# https://gist.github.com/dogrocker/1efb8fd9427779c827058f873b94df95
# https://linuxhint.com/install_zsh_shell_ubuntu_1804/
echo "*********************************************"
echo " zsh fancifier"
echo "*********************************************"
echo ""
echo "1. Installing oh-my-zsh..."
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo ""
echo "2. Installing powerline fonts..."
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
mkdir -p ~/.local/share/fonts/
mv PowerlineSymbols.otf ~/.local/share/fonts/
fc-cache -vf ~/.local/share/fonts/
mkdir -p ~/.config/fontconfig/conf.d/
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
echo ""
echo "3. Installing powerlevel10k theme ..."
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
# legacy them powerlevel9k
# git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
sed -i 's@^ZSH_THEME=.*$@ZSH_THEME="powerlevel10k/powerlevel10k"@g' ~/.zshrc
echo ""
echo "4. Installing autosuggestions and syntax highlighting..."
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
sed -i 's@plugins=(git)@plugins=(git zsh-autosuggestions zsh-syntax-highlighting)@g' ~/.zshrc
echo ""
echo "Finish! Log out of your session and login again."
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." |
zsh-install.sh
· 307 B · Bash
Raw
#!/bin/bash
echo "*********************************************"
echo " zsh installer (vanilla)"
echo "*********************************************"
sudo apt-get update
sudo apt-get install zsh -y
chsh -s $(which zsh)
echo ""
echo "Finish! Log out of your session and login again. Then run zsh-fancify.sh"
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" |