Liviu Hariton
PHP developer
Setup a beautiful Mac Terminal
1. Install iterm2 – https://iterm2.com/
Check if default terminal shell is -zsh
echo $0
if it’s not, set it via Homebrew
brew install zsh
and change the shell
chsh -s $(which zsh)
2. Install a color scheme from https://iterm2colorschemes.com/ and import it via the iterm2 Preferences (Profiles | Default | Colors | Color presets… | Import…)
- dark themes (save them to your local computer): Gruvbox Dark or JetBrains Darcula
3. Install Oh My ZSH! – https://ohmyz.sh/
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
4. Install Powerlevel10k theme for Zsh – https://github.com/romkatv/powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
update the -zsh config
nvim ~/.zshrc
change the theme
ZSH_THEME="powerlevel10k/powerlevel10k"
reload the configuration and follow the on-screen configuration wizard
source ~/.zshrc
5. Enable syntax highlighting – https://github.com/zsh-users/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
6. Enable autosuggestions – https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
update the -zsh config
nvim ~/.zshrc
enable the plugin
plugins=(
# other plugins...
zsh-autosuggestions zsh-syntax-highlighting
)
reload the configuration
source ~/.zshrc
7. Enhance directory listing with Color LS – https://github.com/athityakumar/colorls
sudo gem install colorls
create an alias for the ls
command by updating the -zsh config
nvim ~/.zshrc
at the very bottom of the file, on a new line, enter the following:
alias ls='colorls'