DEV Community

Oh My Zsh + PowerLevel10k = 😎 terminal

abdfn on December 23, 2020

Hi there, The developers always use the terminal, but it is boring and has no colors or shapes. Today we will transform our terminals into a wonder...
Collapse
 
ombratteng profile image
Ole-Martin Bratteng

I can recommend exa as a replacement for colorls
the.exa.website/
exa

Collapse
 
syndelis profile image
Syndelis

I myself recommend lsd (lsDeluxe) as the replacement
github.com/Peltoche/lsd

Collapse
 
abdfnx profile image
abdfn

👌

Collapse
 
abdfnx profile image
abdfn • Edited

WOW, It's good, I'll try it 👍, can you tell me what is the font on the image ?

Collapse
 
ombratteng profile image
Ole-Martin Bratteng

It's FiraCode with NerdFont patches
https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q40jb8xksefyl08by3m5.png

Thread Thread
 
abdfnx profile image
abdfn • Edited

Nice, I tried exa and it's very powerful

Thread Thread
 
ombratteng profile image
Ole-Martin Bratteng

I've got this in my .zshrc file

if [ -x "$(command -v exa)" ]; then
    alias ls="exa"
    alias la="exa --long --all --group"
fi
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
abdfnx profile image
abdfn

This is better

Thread Thread
 
ombratteng profile image
Ole-Martin Bratteng

Yeah, I wrap all my aliases in if clauses, that way I can share my dotfiles across systems, and not worry if e.g. exa isn't installed on that particular machine, I still have the original ls

Collapse
 
mahamatali profile image
Mahamat Ali Youssouf

Thank you so much

Collapse
 
coding404life profile image
Yahya

Hello thanks for sharing I have an issue with it some icons is not showing what could make this issue

Collapse
 
abdfnx profile image
abdfn

Hi, the problem is from the font, try Hack nerd or MesloLGS NF fonts

Collapse
 
coding404life profile image
Yahya • Edited

thanks for reply I have used both and the issues till there and I even downloaded the 4 fonts from their GitHub repo and install them and I can't see them

Thread Thread
 
abdfnx profile image
abdfn • Edited

What's your system ?
And which terminal do you use ?

Thread Thread
 
coding404life profile image
Yahya

Mac os big sur i use the normal terminal and I have installed iterm2 and issue still with icons is there too :)

Thread Thread
 
abdfnx profile image
abdfn • Edited

Ok, go to iTerm preferences, 👉 profiles 👉 general and paste /bin/zsh.
after this restart iTerm2.

alt

Make sure your font in preferences 👉 profiles 👉 text is MesloLGS NF.

x

Go to the terminal and type

source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

and configure your design

x

Thread Thread
 
coding404life profile image
Yahya

Thanks Alot it fixed the issue much appreciated
:)

Thread Thread
 
abdfnx profile image
abdfn • Edited

Anytime bro 🤝

Collapse
 
abdfnx profile image
abdfn

🤝

Collapse
 
whystart profile image
WhyStart

How are your screenshots generated?

Collapse
 
abdfnx profile image
abdfn

in Windows, press Alt+Print Screen

in MacOS

Collapse
 
winklerjan profile image
Jan Winkler • Edited

also in win, you can create a selection by pressing "win + shift + S"

Thread Thread
 
abdfnx profile image
abdfn

🤝

Collapse
 
whystart profile image
WhyStart

thanks

Thread Thread
 
mudit000 profile image
Mudit Kumar • Edited

Shift+CTRL+Command+4 is a better way to snap selected area..and automatically copy to clipboard

Thread Thread
 
abdfnx profile image
abdfn

👌

Collapse
 
httvhutceoscop profile image
Viet NT

It's nice, thank you!

Collapse
 
abdfnx profile image
abdfn

glad to help

Collapse
 
nedcode profile image
Ned Marafawi

Thank you for the exa ls. Really helpful! 😊

Collapse
 
molikawsaud profile image
Saad Bakhiyi

Thank you a lot ths is the first time I can do this I'm so happy thank for you help

Collapse
 
abdfnx profile image
abdfn

❤ glad for help you

Collapse
 
gshanbhag525 profile image
Gunesh Shanbhag

@ombratteng @abdfn
I am not able to get exa working with alias ls.
I ahve added the if stmt you had provided but still ls doesnt print exa's style.
I am on macos big sur with iterm.

Collapse
 
abdfnx profile image
abdfn

execute this command

source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode
Collapse
 
cbouttes profile image
cbouttes

Salut, j'ai eu un problème parce que oh mon zsh montre un caractère bizarre '?' sur mon terminal sous Ubuntu WSL2.
Je recommande le tutoriel Youtube suivant "HOW TO install powerlevel10k for zsh/oh-my-zsh WITH Nerd Fonts inside WSL" qui montre comment installer "Meslo Nerd Font" sur Windows ce qui résout le problème.

Collapse
 
tddevem profile image
Emre

broken instruction, p10k is not found. I'll go through source page.

Collapse
 
krishanu7 profile image
Krishanu Saha

Image description)

i followed each steps but i can not read anythin in the terminal ? is occuring