Guide: Installing Oh My Zsh & Powerlevel10k on macOS
This guide covers the complete setup for your new MacBook, specifically tailored for the native macOS Terminal.app.
Phase 1: Install Oh My Zsh
First, we need the framework that manages your terminal configuration. Open your Terminal and run:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Action: When it asks if you want to change your default shell to Zsh, type Y.
Phase 2: Install Powerlevel10k Theme
Next, download the Powerlevel10k theme files into your Oh My Zsh custom themes folder:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Now, tell Oh My Zsh to use this theme:
Open your config:
nano ~/.zshrcFind
ZSH_THEME="robbyrussell"and change it to:ZSH_THEME="powerlevel10k/powerlevel10k"Save and Exit (Ctrl+O, Enter, Ctrl+X).
Phase 3: The "Force-Fix" for Missing Icons
If the P10k wizard isn't offering to install the font for you, or if you see square boxes instead of icons, you must force-install the Nerd Fonts manually.
1. The Direct Download Fix
Run these four commands one by one. This bypasses the wizard and places the fonts directly into your Mac's system font folder:
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf -o ~/Library/Fonts/"MesloLGS NF Regular.ttf"
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf -o ~/Library/Fonts/"MesloLGS NF Bold.ttf"
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf -o ~/Library/Fonts/"MesloLGS NF Italic.ttf"
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf -o ~/Library/Fonts/"MesloLGS NF Bold Italic.ttf"
2. Activate the Font in Terminal Settings
Crucial: Terminal.app will not use these fonts automatically. You must toggle them on:
Quit Terminal completely (Cmd + Q) and re-open it.
Press Cmd + , (Comma) to open Settings.
Go to Profiles (top tab) → Text (right sub-tab).
Under the Font section, click Change.
Search for MesloLGS NF and select it.
Close the settings window.
Phase 4: Final Configuration
Now that the "brains" (the font) are installed, restart the visual configuration wizard:
p10k configure
What to look for:
When it asks "Does this look like a diamond/lock/apple?", you should now see the actual symbols. Type (y) for each.
Follow the prompts to choose your preferred style (Rainbow is recommended for the best look).
No comments:
Post a Comment