2 minutes
Beautiful Terminal on Macos With Wezterm
In this guide, we’ll walk through setting up a stunning terminal environment on macOS using WezTerm. Ensure homebrew is installed, configure the zsh shell, and set up WezTerm with a beautiful theme and font.
Prerequisites
Before we begin, make sure you have homebrew installed. If not, follow the steps below to install it.
Step 1: Install Homebrew
Homebrew is a package manager for macOS that makes it easy to install software. Open your terminal and run the following command to install homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Verify the installation by running:
brew --version
Step 2: Configure zsh Shell
We’ll configure the zsh shell using a .zshrc file from a GitHub repository.
Clone the repository:
git clone https://github.com/ltphong112/dotfile.git
Copy the .zshrc file to your home directory:
cp dotfile/.zshrc ~/
Source the .zshrc file to apply the changes:
source ~/.zshrc
Step 3: Install WezTerm
WezTerm is a GPU-accelerated terminal emulator and multiplexer. We’ll install it using homebrew.
Install WezTerm:
brew install --cask wezterm
Install the SF Mono Nerd font:
brew tap homebrew/cask-fonts
brew install --cask font-sf-mono-nerd-font
Configure WezTerm with background opacity and blur. Create or edit the WezTerm configuration file (~/.wezterm.lua) with the following settings:
return {
font = wezterm.font("SF Mono Nerd Font"),
font_size = 12.0,
window_background_opacity = 0.9,
window_background_blur = 10.0,
}
Step 4: Install and Configure Starship
Starship is a cross-shell prompt that is fast, customizable, and minimal. We’ll install it and use a configuration file from the same GitHub repository.
Install Starship:
brew install starship
Copy the starship.toml file to your configuration directory:
cp dotfile/starship.toml ~/.config/starship.toml
Add the following line to your .zshrc to initialize Starship:
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
Source the .zshrc file to apply the changes:
source ~/.zshrc
The theme used in Starship is tokyonight, which provides a visually appealing and modern look to your terminal prompt.
Conclusion
You now have a beautifully configured terminal on macOS using WezTerm and Starship. Enjoy your new setup!