Configuring Zsh on Manjaro using Starship Theme![Noob Edition]
Alright, let’s admit its 2020 and the default terminal looks like its straight from the '90s!
Let me introduce you to the zsh(Zee-shell)! It's feature-rich compared to bash. Well, fish(another shell) may be better, but it's like comparing apples to oranges. So let’s restrict to zsh for now! Let’s dive in. Here’s a snapshot of the end result.
Before we begin, let me tell you the steps are safe and you can always roll back to the original state! Let’s dive in!
- Install ZSH:
Mostly it comes pre-installed. Check it by typing zsh on your terminal. If there is a command not found error, you know the drill:
sudo pacman -Syu zsh
2. Install Oh-My-ZSH.
It’s kinda plugin manager to customize and install themes on zsh. Check out their readme o find out more! Now type this and follow the interactive.
sh -c “$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
3. Install a few plugins.
ZSH is simply great with plugins. To install a plugin all you need is to add in the plugin list in .zshrc file.
nano ~/.zshrc #opens the edito
Next edit this line :
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git )# add plugins here with space or a newline
3. Installing a theme.
Just like plugin edit this line in .zshrc. Head over to this link. You can stop here. (I suggest you check out spaceship theme!) . But we will be installing starship! So read on if you are interested! (Just log out and log in to see the changes). If bash still shows up, make zsh theme default and re-login!
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
Comment out the theme in zshrc for installing starship theme!
4. Install the starship theme!
curl -fsSL https://starship.rs/install.sh | bash
Next, add this at the end of your .zshrc file:
eval "$(starship init zsh)"
Source your zshrc to see the effect:
5. Install required fonts:
If you see a weird box or question marks on the terminal, it means that font isn’t installed. Install any Nerd or powerline fonts. And use that font for the terminal.
6. Customizing starship theme!
Head over to this link customize starship theme according to your needs!
That’s all! Embrace the new age terminal and feel awesome!
KDE Konsole Specific tweaks!
The console may show weird signs even after installing a font! The emojis may not be shown. There is a workaround for this. Check this link for the workaround! Make sure you use a different monospace font for system-wide use! Else you may see emojis instead of numbers elsewhere!
If you see very bold colours, uncheck show intense colours in bold. And disable bi-directional rendering(If you see any characters showing only half of it)
That’s it! Enjoy and embrace open source!