- install
sudo apt install zsh1.1 Change $ZDOTDIR path
ZSH needs many configuration files, .zshenv, .zprofile, .zshrc, and others. Change ZDOTDIR in the system wide .zshenv. Then, make sure to create all these config files in the ZDOTDIR path.
sudo nano /etc/zsh/zshenv
# add this line at the end of the file
export ZDOTDIR="$HOME"/.config/zsh- check version
zsh --version- change default shell
chsh -s $(which zsh)- run it (it won't be default in GNOME terminal until you logout/login)
exec zsh- install customization dependencies
sudo apt install curl git- install Oh-My-Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"- install fonts
download fonts
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttfMove them to ~/.local/share/fonts/ (KDE Plasma ~/.fonts/m/)
mkdir -p ~/.local/share/fonts/
mv *.ttf ~/.local/share/fonts/
# mv *.ttf ~/.fonts/m/Or (double click the file)
Change the terminal font.
- Install P10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k- Set
ZSH_THEME="powerlevel10k/powerlevel10k"in~/.zshrc - run
zshagain, should trigger p10k
exec zsh- if it doesn't start automatically
p10k configure- Install
zsh-autosuggestions
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestionsadd zsh-autosuggestions to ~/.config/zsh/.zshrc plugins
13. install zsh-syntax-highlighting
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightingadd zsh-syntax-highlighting to ~/.config/zsh/.zshrc plugins
14. install Dracula Highlighting for zsh-syntax-highlighting
clone the repo
git clone --depth=1 https://github.com/dracula/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/dracula-zsh-syntax-highlightingsource dracula .sh from ~/.config/zsh/.zshrc before the plugins.
# on raspberrypi I had to set ZSH_CUSTOM
ZSH_CUSTOM=$ZSH/custom
source ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/dracula-zsh-syntax-highlighting/zsh-syntax-highlighting.sh- Change ZSH_COMPDUMP location in
~/.config/zsh/.zshrcbefore linesource $ZSH/oh-my-zsh.sh
Oh-My-Zsh creates many files .zcompdump in $HOME, hide it inside ~/.oh-my-zsh/
# oh-my-zsh creates many files .zcompdump in $HOME, hide it inside ~/.oh-my-zsh/
export ZSH_COMPDUMP=$ZSH/cache/.zcompdump-$HOST-$ZSH_VERSION
source $ZSH/oh-my-zsh.sh-
review
~/.config/zsh/.zshrcand~/.p10k.shbased on files below -
Create
~/.config/zsh/.zprofile
emulate sh -c 'source $HOME/.profile'
- Create
~/.config/zsh/.zshenv
For some reason .zsh_history does not consider ZDOTDIR
export HISTFILE="${ZDOTDIR}/.zsh_history"- zsh
- shell
- https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#install-and-set-up-zsh-as-default
- config
~/.config/zsh/.zshrcas file below
- oh-my-zsh
- zsh config manager
- https://github.com/ohmyzsh/ohmyzsh#basic-installation
- powerlevel10k (oh-my-zsh theme)
- zsh-autosuggestions
- give suggestion for autocomplete a terminal command based on history
- https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md
- zsh-syntax-highlighting
- terminal syntax highlight
- https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md#oh-my-zsh