DEV Community

Heitor Ramon Ribeiro
Heitor Ramon Ribeiro

Posted on

ZSH, Fonts and a Beautiful Terminal

Let's focus on our primary source of information in the development world—the terminal.

I know most of you may want to use newer applications to handle terminal operations like iTerm2 or others. Still, personally, the built-in terminal application can take a lot and can be a potent application.

Fonts

The first step is to install the basic fonts needed in our terminal.

# Nerd Fonts
brew tap homebrew/cask-fonts
brew install font-hack-nerd-font
Enter fullscreen mode Exit fullscreen mode
  • Copy Fonts

If you cloned or forked the repository you can execute the following command

cp -r "$(pwd)/fonts/"* ~/Library/Fonts
Enter fullscreen mode Exit fullscreen mode

ZSH

The oh my Zsh project is a good terminal add-on to be added in our development environment.

  • Install
# Oh My ZSH
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Enter fullscreen mode Exit fullscreen mode
  • Set the configuration file

If you cloned or forked the repository you can execute the following command

ln -s $(pwd)/zsh/zshrc ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

Plugins

Here are some plugins that can be used alognside with Oh My Zsh, and make your experience much better.

If you cloned or forked the repository and used the configuration file, those plugins are required.

  • zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
Enter fullscreen mode Exit fullscreen mode
  • zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
Enter fullscreen mode Exit fullscreen mode
  • zsh-async
git clone https://github.com/mafredri/zsh-async ~/.oh-my-zsh/plugins/async
Enter fullscreen mode Exit fullscreen mode
  • zsh-nvm
git clone https://github.com/lukechilds/zsh-nvm ~/.oh-my-zsh/custom/plugins/zsh-nvm
Enter fullscreen mode Exit fullscreen mode
  • powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
Enter fullscreen mode Exit fullscreen mode

If you cloned or forked the repository you can execute the following command

ln -s $(pwd)/zsh/p10k ~/.p10k.zsh
Enter fullscreen mode Exit fullscreen mode

These steps are available only for those who cloned or forked the repository

Terminal

To add some new configurations and special tools to the terminal, you can execute the following command to import those.

  • Set the configuration file
ln -s $(pwd)/bash/bash_alias ~/.bash_alias
ln -s $(pwd)/bash/bash_profile ~/.bash_profile
ln -s $(pwd)/bash/bashrc ~/.bashrc
ln -s $(pwd)/bash/profile ~/.profile
ln -s $(pwd)/bash/profile ~/.android
ln -s $(pwd)/bash/profile ~/.flutter
ln -s $(pwd)/bash/profile ~/.nvm-load
Enter fullscreen mode Exit fullscreen mode

Attention, because inside the files .android, .flutter, .nvm-load there are specific configurations, with version based, please edit the file with the appropriate version before loading those.

Theme

You can change the Mac Terminal application appearance with some quick steps.

  1. Terminal > Settings Tab
  2. Click "Gear" icon
  3. Click Import...
  4. Select the materialshell-dark.terminal file
  5. Click Default

Image description

Image description

Top comments (0)