Last active 1740029852

zsh-fancify.sh Raw
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
9echo "*********************************************"
10echo " zsh fancifier"
11echo "*********************************************"
12echo ""
13echo "1. Installing oh-my-zsh..."
14sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
15
16echo ""
17echo "2. Installing powerline fonts..."
18wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
19wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
20mkdir -p ~/.local/share/fonts/
21mv PowerlineSymbols.otf ~/.local/share/fonts/
22fc-cache -vf ~/.local/share/fonts/
23mkdir -p ~/.config/fontconfig/conf.d/
24mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
25
26echo ""
27echo "3. Installing powerlevel10k theme ..."
28git 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
31sed -i 's@^ZSH_THEME=.*$@ZSH_THEME="powerlevel10k/powerlevel10k"@g' ~/.zshrc
32
33echo ""
34echo "4. Installing autosuggestions and syntax highlighting..."
35git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
36git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
37sed -i 's@plugins=(git)@plugins=(git zsh-autosuggestions zsh-syntax-highlighting)@g' ~/.zshrc
38
39echo ""
40echo "Finish! Log out of your session and login again."
zsh-install.sh Raw
1#!/bin/bash
2echo "*********************************************"
3echo " zsh installer (vanilla)"
4echo "*********************************************"
5sudo apt-get update
6sudo apt-get install zsh -y
7chsh -s $(which zsh)
8
9echo ""
10echo "Finish! Log out of your session and login again. Then run zsh-fancify.sh"