Have you ever thought how boring is a pre-installed MacOs Terminal shell?
Since I have jumped into a development I have been optimizing my shell setup till now and want to present you my setup, that can serve you as inspiration. The only dependency is Zsh β‘οΈ Oh-My-Zsh β‘οΈ PowerLevel10k. tmux gives you windows splitting, session management and many more. nvim is a superset of vim (can be the most productive text editor for me, but still practicing it).
First of all you don't have to use the preinstalled Terminal emulator (which is an emulator of the shell, no more, no less).
There is a better version called iTerm2. Check on it here: https://iterm2.com
Installation
Installation is super easy over Brew package manager (hope you have it! otherwise proceed first with https://brew.sh):
brew install --cask iterm2
Install zsh, again with brew:
brew install zsh
You should probably run
zsh
to activate it in your session. The script from step 2 should take care about setting up zsh as your default shell.Install Oh-my-zsh, which is great project from Robby Russel by running this command:
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- The last step in installation is getting powerlevel10k (which is a fork of the famous powerlevel9k).
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Then next steps are more about configuration:
You need to change the default Oh-my-zsh theme in
~/.zshrc
If you are you using Finder and can't see it unhide hidden files withShift+Cmd+.
findZSH_THEME
and replace the whole line with
ZSH_THEME="powerlevel10k/powerlevel10k"
Activate the new configuration by sourcing the .zshrc by
source ~/.zshrc
Now the Configuration Wizard of PowerLevel10k should be started. Otherwise run
p10k configure
manually.You should install the Meslo Nerd Font π€ if not yet installed.
Close & Open iTerm2
Also make sure the font chosen in the Settings of iTerm2 (once installed):
Once the font is set up properly, proceed with further setting of PowerLevel10k
Make sure you see the same symbols properly! Otherwise your font is not properly configured (manual installationbrew install --cask font-meslo-lg-nerd-font
). As I had no problems with the fonts I proceed mostly with Yes.
I prefer the Lean version. You can choose whatever you prefer:
Unicode for me.
As I love colors π¨ I proceed with 1 (256 colors)
Germans π» love precise time β°, so I proceed with 24 hours format. Choose whatever you prefer.
I proceed with one-liner to have more information on my screen later. Choose whatever you prefer.
Same explanation, more information on square inch. I proceed with Compact option.
Here I proceed with more Icons, some of space is needed but make your life more vivid. π Choose whatever you prefer.
I proceed with Concise. The fluency is great for beginners, but this doesn't bring you more productivity.
Was hard to decide, after trying out both, I stay with No for Transient Prompt. I have no strong opinion on both choices yet though.
Instant prompt is the feature from PowerLevel10K, that gives you instant prompt while still running some background tasks, before the Shell is 100% ready. This can be advantage. Read on that here github:PowerLevel10k
You can decide later if you want to disable it, if you face problems.
The option 2 "Quiet" let you forget about the feature. The option 1 "Verbose" is gonna remind you on each lunch π
launch. You can disable it later too. So read the manual and decide. I am opting with 2, cause I understand the consequences.
Overwrite the older configuration (with back up) Yes!
If you don't see the changes, try to reload iTerm2 or source ~/.zshrc.
TMUX (Terminal Multiplexer) Installation. This is optional, as you can use iTerm2 for similar features (multi-window).
I proceed with
brew install tmux
After installing it just run
tmux
You can split windows by
Ctrl+B
then"
for horizontal splitting or/and%
for vertical splitting.tmux is very powerful and has much more functions than window splitting, for example detaching sessions for background running and attaching them back. You can find a cheat sheet cheat sheet
Now Neovim.
Neovim (or Nvim) is as superset of Vim, that is great and can replace your IDE'like text editor. The requirement is that you want to ban your mouse from your desk π
. As Nvim is not the focus of this article. I can just list the plugins i have installed.
First of all install Neovim with brew install neovim
You can find over 1300 Plugins list here Neovim plugins
- The "beautiful"? Apple Logo with your Host data is being generated by cli tool Neofetch. Which is meanwhile deprecated and replaced by fastfetch. Just install it with
brew install fastfetch
and runfastfetch
.
That is all for now.
As I have mentioned, the only PowerLevel10K depends on Oh-My-Zsh , which depends on Zsh. The other tools are free to install and use (or don't use) in any order.
Suggestions, optimizations, and contributions are welcome!
You can follow me here or on github: https://github.com/aktienautobahn
Thanks for your attention!
Top comments (0)