Introduction
Introduce the concept of customizing your macOS terminal to enhance productivity and aesthetics. Mention that in this guide, you’ll walk readers through setting up Zsh as the shell, Powerlevel10k as the theme, and Warp as the terminal emulator.
1. Install Warp
Create an account on the official Warp website.
Install Warp using Homebrew.
brew install --cask warp
2. Installing Oh My Zsh
The official website for Oh My Zsh can be found at: https://github.com/ohmyzsh/ohmyzsh.
Please ensure that you meet the prerequisites before proceeding with the installation. You can find the prerequisites here: https://github.com/ohmyzsh/ohmyzsh#prerequisites.
To install Oh My Zsh, you can use the following command:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
3. Integrating Powerlevel10k with Warp
The official website for Powerlevel10k can be accessed at: https://github.com/romkatv/powerlevel10k#getting-started
Utilize Homebrew to install Powerlevel10k, which will concurrently set up the required fonts and the Powerlevel10k theme will be added to your .zshrc configuration:
Note: both commands needs to be executed together.
brew install romkatv/powerlevel10k/powerlevel10k
echo "source \$(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >> ~/.zshrc
Restart Zsh using:
exec zsh
If the configuration wizard doesn’t start automatically, you can initiate it manually by typing:
p10k configure
Navigate to Warp Settings, then choose Appearance and locate the Prompt section. Click on the prompt as shown in the image below.
Next, select “Shell prompt (PS1)” and proceed to save the changes, as illustrated in the image below.
After restarting Warp, you will have successfully integrated Powerlevel10k into your Warp.
4. (Optional) Keep the kubecontext always displayed in the Terminal
code ~/.p10k.zsh
Find POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND
and comment them out.
# Tip: Remove the next line to always show kubecontext.
# typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND = 'kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'