Configuring Zsh to my liking

Configuring Zsh to my liking

Motivation

I've recently started a new job, with Pop!_OS rather than Windows (yay!). After a year without using Linux day to day, I wanted to reinstall a bunch of things, one of them being zsh, my shell of choice, with Oh My Zsh and Powerline10k.

Why?

It adds a bunch of features to the shell that I like:

  • Seeing my current branch
  • Easier ways to search through history
  • Better auto completion.
  • sexiness

It might, however, impact performance compared to a clean installation of i.e bash. I don't care about speed.

Solution

Installing: ZSH

Instaling:

sudo apt install zsh

Setting it as a default terminal:

chsh -s /usr/bin/zsh

Now reboot so the shell is changed everywhere.

You will now be prompted for some fault settings. They aren't super important, but you can tweak it to your needs. I went through it.

Installing: Oh My Zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Woo! it's now installed. I have a bunch of configurations i'd want to include. You can see my config at the end of this post.

Installing: Powerline10K

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Install the relevant fonts following the guide here.

Change the font in what ever terminal you are using (if gnome terminal, click the burger menu in the top right, go to profiles.. change font)

Then change the theme by changing the ZSH_THEME line to ZSH_THEME="powerlevel10k/powerlevel10k" in your zsh config file (~/.zshrc)

then run source ~/.zshrc(or restart your terminal)

Go through the configuration wizard (you can always open it with p10k configure) and there you go.

Plugins i've installed:

Summary

The installation process was fairly easy by simply following the guides on the projects, but sometimes they can be more difficult. I've mainly written this as a reminder for the future.

Did you find this article valuable?

Support Casper Weiss Bang by becoming a sponsor. Any amount is appreciated!