This is a quick walkthrough how to setup and configure iTerm2, Oh My Zsh! and Powerlevel10k on the mac os 10.12+.
- macOS 10.12+
- xCode tools
- Homebrew
xcode-select --install
/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
sudo chown -R $(whoami) /usr/local/opt
sudo chown -R $(whoami) /usr/local/share
brew install --cask iterm2
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"
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
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
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
brew install mc
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
Tap:
brew install jesseduffield/lazygit/lazygit
or Core:
brew install lazygit
brew install ranger