Oh My Zsh + PowerLevel10k = 😎 terminal

Pre-requisites

Setup zsh

brew install zsh
zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

PowerLevel10k

  • Install Powerlevel10k using the following command
# gh cli
gh repo clone romkatv/powerlevel10k $ZSH_CUSTOM/themes/powerlevel10k
# git
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
ZSH_THEME="powerlevel10k/powerlevel10k"
  • Make sure your terminal font is FiraCode NF.

Cheat-sheet for Windows

{
"guid": "{YOUR_UNIX_GUID}",
"hidden": false,
"name": "Ubuntu",
"source": "Windows.Terminal.Wsl",
"fontFace": "FiraCode NF",
"snapOnInput": true,
"useAcrylic": true
}

p10k configure

p10k configure

Clone plugins

  • zsh-syntax-highlighting — It enables highlighting of commands whilst they are typed at a zsh prompt into an interactive terminal. This helps in reviewing commands before running them, particularly in catching syntax errors.
# gh cli
gh repo clone zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# git
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  • zsh-autosuggestions — It suggests commands as you type based on history and completions.
# gh cli
gh repo clone zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# git
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

ls tools

  • colorls: A Ruby script that colorizes the ls output with color and icons
  • exa: is a modern replacement for ls

colorls

sudo gem install colorls

warn 🙃

maybe you’ll get some gem errors, you should fix it

sudo apt install ruby-full

exa

brew install exa
plugins=( git zsh-syntax-highlighting zsh-autosuggestions )
if [ -x "$(command -v colorls)" ]; then
alias ls="colorls"
alias la="colorls -al"
fi
if [ -x "$(command -v exa)" ]; then
alias ls="exa"
alias la="exa --long --all --group"
fi
source ~/.zshrc

Finally it should be like this 👇

--

--

--

someone likes CLI/TUI apps, automation, server-sides, and backend.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

A Model for Agile Share-in-Savings

How to claim $MWT airdrop

My account

Getting Started With Kubernetes Ingress Controllers

Writing Beautiful, Idiomatic Python Code

The Beginning…

Project Kickstarters for Microservices

Chapter One: Shooting My Shot.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abdfnabd

Abdfnabd

someone likes CLI/TUI apps, automation, server-sides, and backend.

More from Medium

Linux Upskill Challenge — Day 0 (Part 2)

Top 7 uses of The “free” command for monitoring Linux Memory Usage

How to Add and Remove Users on Ubuntu 20.04

Ubuntu Ethernet Configuration