“Have nothing in your [terminal] that you do not know to be beautiful or believe to be useful.”
In this post, we’ll walk you through how to customize your zsh prompt so it’s both beautiful and useful when you’re working with the Warp terminal on your Mac computer.
Already familiar with p10k? Skip to the setup.
Powerlevel10k (sometimes called “p10k”) is a plugin you can use to customize the appearance of your zsh prompt. Billed by its creator Roman Perepelitsa as “A Zsh theme,” p10k is widely adored by developers, with more than 37K GitHub stars as of time of writing.
Compared to no-rcs (the default zsh prompt with zero .rc files), p10k gives you:
Out of the box, Warp’s default prompt is more feature rich and contextual than the default you’ll get with zsh on your Mac terminal but p10k takes this to the next level.
For example, in a customized p10k prompt you can use custom “segments” to display information such as:
P10k’s “batteries included” segments are smart enough to show information related to the tools you’re using, like your Ruby version or kubernetes context.
The resulting setup is some cool “eye candy” that also serves a purpose, making your terminal more grounding and informative as you work.
In a recent survey by Warp to developers, 22% of respondents cited Powerlevel10K as a CLI enhancement they currently use, putting p10k right up against other popular tools like Starship and Neovim.
Warp’s State of the CLI Survey recently wrapped for 2023. Results will be coming out soon!
What’s driving all this adoption? Compared to other similar plugins for prompt customization, p10k touts speed as a benefit and promises no prompt lag. You can check out the benchmarks in the zsh-bench repo.
Plus, p10k is highly extensible. You can use the open API to create your own custom segments that can sit in the right prompt elements and show values of interest.
Beyond the tangibles, we think there’s something awesome about having a sharp setup and showing it off to your friends that makes p10k a plugin worth hyping.
Let’s set it up in Warp!
Getting p10k running in Warp is easy but the order of operations matters a bit to yield the best results. We’ll walk you through it step by step.
Prefer to learn by watching instead of reading? Here’s a video version that covers all the same stuff.
First, if you don’t already have Warp downloaded, you can download and sign up now.
Once you have Warp installed, you’ll want to get the right fonts and adjust your settings as a prerequisite for the p10K setup wizard.
Double-click to download these ttf files and install MesloLGS Nerd Font in Regular, Bold, Italic, and Bold Italic. Follow the prompts to confirm installation in the Font Book on your machine.
Note: p10k works with other Nerd Fonts as well but we’re keeping it simple for the purposes of this tutorial.
Note: Prior to August 2023, you would have needed to enable a setting called "Honor user’s custom prompt (PS1)" in order to apply your PS1 configuration. This setting is no longer needed. Now when you select your PS1 shell prompt in the Warp prompt editor, this will ensure your customer prompt is honored.
In Warp, run this command to download p10K:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
Run exec zsh
to restart zsh.
The p10k configuration wizard should open immediately. If it doesn’t, you can run p10k configure
to get it going.
The install wizard for p10k will walk you through several steps to assess your font compatibility and display supported options for you. Some of the setup options are a matter of personal preference. Here are my personal recommendations if you want to match my setup exactly:
There you go!
Play with Warp themes to quickly adjust the colors of your prompt.
Or, edit the p10k theme files for more granular customization. You can:
There are some known quirks and caveats when you’re using p10k on Warp. Here are the current things to know about:
If you think you’ve stumbled on a fresh bug, please report it on this issue #2851 and we’ll review it post haste.
Got a cool set of custom colors or segments ready to go? Share your .p10k.zsh file or a screenshot of your setup on Twitter or in the Warp community Discord in #show-and-tell.
We can’t wait to see what you put together!