DEV Community

Cover image for Customize your terminal on Manjaro using ZSH with powerlevel10k, Autosuggestion and Syntax Highlighting plugin
Shawon Saha
Shawon Saha

Posted on

Customize your terminal on Manjaro using ZSH with powerlevel10k, Autosuggestion and Syntax Highlighting plugin

Step 1. Install ZSH



sudo pacman -S zsh


Enter fullscreen mode Exit fullscreen mode

Step 2. Make ZSH default



chsh -s $(which zsh)


Enter fullscreen mode Exit fullscreen mode

Step 3. Install font for powerlevel10k

Download these four ttf files and then install by double clicking each of them.
*MesloLGS NF Regular.ttf
*MesloLGS NF Bold.ttf
*MesloLGS NF Italic.ttf
*MesloLGS NF Bold Italic.ttf

Step 4. Log Out / Restart your machine

Step 5. Change Terminal font

First of all make sure your default terminal is ZSH by echo $SHELL. The return should be /usr/bin/zsh

Then from terminal goto Settings > Edit Current profile > Appearance > Choose > MesloLGS NF
Konsole Profile Settings Window
Konsole font choosing window

Step 6. Powerlevel10k installation

Clone the repo



git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k 


Enter fullscreen mode Exit fullscreen mode

Source the powerlevel10k theme script in your .zshrc



echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc


Enter fullscreen mode Exit fullscreen mode

Step 7. Configure Powerlevel10k

Close and reopen terminal. You should prompt with powerlevel10k configuration
powerlevel10k configuration

If you don't get anything like this then run p10k configure

Step 8 (Optional). Fix "p10k configure: cannot create /usr/share/zsh/p10k.zsh because /usr/share/zsh is readonly" error

After running p10k configure if you get this error follow this step.



kate /usr/share/zsh/manjaro-zsh-prompt


Enter fullscreen mode Exit fullscreen mode

You can use nano or other text editor instead of kate

Now put a # at the beginning of line 15 or copy and replace this at line 15 then save the file.



#[[ ! -f /usr/share/zsh/p10k.zsh ]] || source /usr/share/zsh/p10k.zsh


Enter fullscreen mode Exit fullscreen mode

/usr/share/zsh/manjaro-zsh-prompt source code

Now close and open terminal again to get the configuration wizard.
powerlevel10 configuration wizard

Step 9. Install Autosuggestion and Syntax Highlighting Plugin



git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions

echo 'source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh'>>~/.zshrc 

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

echo 'source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh'>>~/.zshrc 


Enter fullscreen mode Exit fullscreen mode

Run these 4 command then restart the terminal and see the magic!!!

Top comments (0)