Nerd Font Check Plugin for Oh-My-Zsh
January 30, 2025 ยท View on GitHub
A simple Oh-My-Zsh plugin that checks if Nerd Fonts are installed and offers to install them automatically. Perfect for shell configurations that require Nerd Fonts (like Powerlevel10k, Starship, etc.).
Features
- ๐ Automatically detects if required Nerd Fonts are installed
- ๐ฆ Offers to install fonts using Homebrew
- โ๏ธ Configurable default font
- ๐ Can be run automatically or manually
- ๐ก Provides clear feedback and instructions
Requirements
Installation
- Clone this repository into your Oh-My-Zsh custom plugins directory:
git clone https://github.com/delorenj/nerd-font-check ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/nerd-font-check
- Add the plugin to your Oh-My-Zsh plugins in your
.zshrc:
plugins=(... nerd-font-check)
Usage
Automatic Check
To automatically check for fonts when your shell starts:
# Add to your .zshrc
export NERD_FONT_CHECK_AUTO=1
Manual Check
You can manually check for fonts:
# Check for default font (Hack)
nerd_font_check
# Check for a specific font
nerd_font_check "JetBrains Mono"
Configuration
You can configure the default font by setting:
# Add to your .zshrc
export NERD_FONT_CHECK_DEFAULT_FONT="JetBrains Mono"
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE for details.