Skip to content

Instantly share code, notes, and snippets.

@ololx
Last active February 22, 2022 11:58
Show Gist options
  • Save ololx/7c4585093ef73ee95ca3207956674598 to your computer and use it in GitHub Desktop.
Save ololx/7c4585093ef73ee95ca3207956674598 to your computer and use it in GitHub Desktop.
This is a quick walkthrough how to setup and configure iTerm2, Oh My Zsh! and Powerlevel10k on the mac os 10.12+

Awesome Terminal on macOS 10.12+

demo

This is a quick walkthrough how to setup and configure iTerm2, Oh My Zsh! and Powerlevel10k on the mac os 10.12+.

Prerequisites

  • macOS 10.12+
  • xCode tools
  • Homebrew

1. Install xCode tools

xcode-select --install

2. Install Home Brew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap homebrew/cask-fonts

brew update
brew upgrade
brew cleanup

brew doctor

if you see this message after brew doctor usage:

with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Homebrew/homebrew-core was not tapped properly! Run:
  rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
  brew tap homebrew/core

Warning: Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you, check out the default branch with:
  git -C $(brew --repo homebrew/core) checkout master

Just execute the follows commands:

  rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
  brew tap homebrew/core
  git -C $(brew --repo homebrew/core) checkout master

3. Fix permitions

sudo chown -R $(whoami) /usr/local/opt
sudo chown -R $(whoami) /usr/local/share

4. Install Iterm2

brew install --cask iterm2 

5. Install ZShell

brew install zsh
  • If you need to have ncurses first in your PATH, run:
echo 'export PATH="/usr/local/opt/ncurses/bin:$PATH"' >> ~/.profile
  • For compilers to find ncurses you may need to set:
export LDFLAGS="-L/usr/local/opt/ncurses/lib"
export CPPFLAGS="-I/usr/local/opt/ncurses/include"
  • For pkg-config to find ncurses you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig"

6. Install Oh My Zsh

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

The installation script should set zsh to your default shell, but if it doesn't you can do it manually:

chsh -s $(which zsh)

Fix folders permitions

chmod 755 /usr/local/share/zsh
chmod 755 /usr/local/share/zsh/site-functions

7. Install Powerlevel10k

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

Put this line into your ~.zshrc file

ZSH_THEME="powerlevel10k/powerlevel10k"

Execute follows command and install the fonts

p10k configure

Execute this command again and configure p10k

8. Install zShell plugins

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

git clone https://github.com/nobeans/zsh-sdkman.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/sdkman
curl -s "https://get.sdkman.io" | zsh

brew install thefuck

brew install zsh-history-substring-search
brew install zsh-syntax-highlighting
brew install z
brew install tree

9. Install MC commander

brew install mc

10. Install Color LS

brew install rbenv
rbenv install 2.5.1
rbenv global 2.5.1

gem install colorls

Enable tab completion for flags by entering following line to your shell configuration file (~/.shellrc or ~/.zshrc) :

source $(dirname $(gem which colorls))/tab_complete.sh

11. Install Lazygit

Tap:

brew install jesseduffield/lazygit/lazygit

or Core:

brew install lazygit

12. Intsall Ranger

brew install ranger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment