Zsh Buddy Theme
April 27, 2026 Β· View on GitHub
Your coding buddy β a motivational Zsh theme with work-life balance reminders, multi-language support, and a touch of humor.
β¨ Features
- π Multi-language support (Vietnamese, English) with easy extension system
- π Time-based buddy messages with special overtime reminders (17:30-18:30)
- β‘ Command-specific responses for Git, Docker, npm, Python, and 50+ commands
- π¨ Dynamic prompt with time icons, git status, virtual environment info
- π± System detection (WSL, macOS, Windows, Linux)
- βοΈ Configurable language settings via config file or environment variables
- π Auto-setup - automatically creates required directories and default files
- π¬ 70+ contextual messages for different times and commands
π Quick Start
One-Line Install (Recommended)
bash <(curl -sf https://raw.githubusercontent.com/hieudnm/zsh-buddy-theme/main/install.sh)
The installer will automatically:
- Detect your OS (macOS / Linux / WSL / Windows)
- Install Zsh if not present
- Download all theme files
- Install Nerd Font
- Set Zsh as default shell
Manual Install
Click to expand manual installation steps
-
Install Zsh (if not already installed):
- macOS:
brew install zsh - Ubuntu/Debian:
sudo apt install zsh - Windows (MSYS2): https://packages.msys2.org/packages/zsh
- macOS:
-
Download theme files:
curl -sf -o ~/.zshrc https://raw.githubusercontent.com/hieudnm/zsh-buddy-theme/main/.zshrc && mkdir -p "$HOME/.troll_themer/lang"curl -sf -o "$HOME/.troll_themer/config" https://raw.githubusercontent.com/hieudnm/zsh-buddy-theme/main/.troll_themer/configcurl -sf -o "$HOME/.troll_themer/lang/vi.txt" https://raw.githubusercontent.com/hieudnm/zsh-buddy-theme/main/.troll_themer/lang/vi.txt && curl -sf -o "$HOME/.troll_themer/lang/en.txt" https://raw.githubusercontent.com/hieudnm/zsh-buddy-theme/main/.troll_themer/lang/en.txt -
Set Zsh as default and restart terminal:
chsh -s $(which zsh)
After installation, restart your terminal and enjoy! π
π Language Configuration
Method 1: Environment Variable (Recommended)
export TROLL_LANG="en" # English
export TROLL_LANG="vi" # Vietnamese (default)
Method 2: Configuration File
The theme automatically creates .troll_themer/config:
# Available languages: vi (Vietnamese), en (English)
TROLL_LANG="vi"
π Serious Mode
Sometimes you need to focus without the trolling. The theme includes a serious mode that temporarily disables all troll messages:
Quick Mode Switching
# Enable serious mode (disable trolling)
serious
# or
export TROLL_MODE="serious"
# Back to troll mode (enable trolling)
troll
# or
unset TROLL_MODE
# Check current mode
mode-status
Use Cases
- Important presentations - No unexpected messages during demos
- Pair programming - Professional environment with colleagues
- Learning/tutorials - Clean output when following tutorials
- Production debugging - Focus on serious troubleshooting
Example:
$ serious
π Serious mode activated. Trolling disabled.
$ git commit -m "Fix critical bug"
# No troll messages, clean output
$ troll
π Troll mode activated. Let the fun begin!
$ git push
Push thΓ nh cΓ΄ng rα»i, nghα» xΓu uα»ng miαΊΏng nΖ°α»c ngΖ°α»i ΔαΊΉp!
ποΈ Uninstall
uninstall
The uninstaller will:
- Restore your previous
.zshrcfrom backup (if available) - If no backup exists, extract and keep your custom config (PATH, aliases, exports added after
ZSH_BUDDY_THEME_END) - Remove
~/.troll_themer/and all backups - Remove
zsh-autosuggestionsplugin - Remove zsh auto-start from
.bashrc(if added by installer)
Clean Backups
clean-backups
Remove all .zshrc.backup and .troll_themer.backup files. Useful if you want to free up space without uninstalling.
π Project Structure
zsh-buddy-theme/
βββ .zshrc # Main theme file
βββ .troll_themer/ # Configuration & resources directory
β βββ config # Language configuration file
β βββ font/ # Included font
β β βββ CaskaydiaMonoNerdFontMono-SemiBold.ttf
β βββ lang/ # Language packs directory
β βββ vi.txt # Vietnamese messages
β βββ en.txt # English messages
βββ version.txt # Theme version
βββ install.sh # One-line installer script
βββ preview.png # Theme preview screenshot
βββ LICENSE # MIT License file
βββ README.md # This documentation
οΏ½ Message Categories
| Category | Count | Description |
|---|---|---|
welcome | 1 | Welcome message on theme load |
update_* | 2 | Update and repository messages |
overtime | 30 | Work-life balance reminders (17:30-18:30) |
hour_* | 24 | Time-specific messages for each hour |
cmd_* | 57 | Command-specific responses |
Supported Commands
Git, Docker, npm, yarn, Python, pip, system commands (ls, cd, mv, cp, rm), text editors (vim, nano), system monitoring (htop, ps, df, free), and many more!
οΏ½οΈ Adding New Languages
-
Create a language file:
touch .troll_themer/lang/your_lang.txt -
Follow the format:
# Your Language Pack for Zsh Buddy Theme # Format: category:message welcome:π Welcome message in your language overtime:Work late message hour_08:Morning message cmd_git_commit:Git commit response -
Set your language:
export TROLL_LANG="your_lang"
π¨ Theme Preview

βοΈ Configuration Options
Custom User Config (Preserved During Updates)
Add your custom PATH, aliases, exports, and other config at the end of .zshrc, after the ZSH_BUDDY_THEME_END marker:
# === ZSH_BUDDY_THEME_END ===
# Everything below this line is preserved during theme updates.
# Add your custom PATH, aliases, exports, and other config here.
export PATH="/usr/local/bin:$PATH"
alias ll="ls -la"
export MY_API_KEY="..."
When you run update, the theme code above the marker is replaced with the new version, but everything below it is automatically preserved.
Environment Variables
TROLL_LANG- Set preferred language (vi, en, or custom)TROLL_MODE- Set to "serious" to disable trolling temporarilyTHEME_NAME- Customize theme name in welcome message
Files
.troll_themer/config- Main configuration file.troll_themer/update- Update check timestamp.troll_themer/lang/*.txt- Language message files
π§ Requirements
- Zsh 5.0+ - The theme is built for Zsh shell
- UTF-8 terminal - For proper emoji and Vietnamese character display
- Git (optional) - For git status display in prompt
π¨ Recommended Font
We highly recommend using Nerd Fonts for the best experience:
- Free and open source - Completely free to use
- Rich character support - Includes powerline symbols, icons, and Vietnamese characters
- Beautiful display - Makes your terminal look professional and modern
- Wide compatibility - Works with all major terminals and operating systems
π Included Font (Ready to Use!)
This theme includes a pre-configured font in the project:
- Cascadia Code Nerd Font Mono (SemiBold) - Located in
.troll_themer/font/ - Perfect for this theme - Optimized for Vietnamese characters and symbols
- No additional download needed - Just install the font file directly
Installation from project folder:
# Windows: Double-click the font file to install
# Or copy to: C:\Windows\Fonts\
# Linux/Ubuntu:
sudo cp .troll_themer/font/CaskaydiaMonoNerdFontMono-SemiBold.ttf /usr/share/fonts/
sudo fc-cache -fv
# macOS:
cp .troll_themer/font/CaskaydiaMonoNerdFontMono-SemiBold.ttf ~/Library/Fonts/
π Alternative Popular Choices
- JetBrains Mono Nerd Font - Clean, modern coding font
- Fira Code Nerd Font - Popular with programming ligatures
- Hack Nerd Font - Designed specifically for source code
Download alternatives:
# Download and install any Nerd Font from:
# https://www.nerdfonts.com/font-downloads
# For Ubuntu/Debian:
sudo apt install fonts-powerline
# For macOS:
brew tap homebrew/cask-fonts
brew install font-jetbrains-mono-nerd-font
Optional Enhancements
- zsh-autosuggestions - Command suggestions
- A powerline-compatible font for better prompt display
π Troubleshooting
Theme not loading?
- Ensure you're using Zsh:
echo $SHELL - Check file permissions:
ls -la .zshrc
Messages not displaying?
- Verify language files exist:
ls .troll_themer/lang/ - Check language setting:
echo $TROLL_LANG
Encoding issues?
- Ensure terminal supports UTF-8
- Try:
export LANG=en_US.UTF-8
π€ Contributing
Contributions are welcome! Here's how you can help:
- Add new languages - Create language packs for your locale
- Improve messages - Make the trolling funnier or more relevant
- Add new commands - Extend command-specific responses
- Bug fixes - Report and fix issues
Development Setup
git clone https://github.com/hieudnm/zsh-buddy-theme.git
cd zsh-buddy-theme
# Test your changes
source .zshrc
π License
This project is licensed under the MIT License - see the LICENSE file for details.
οΏ½ Acknowledgments
- Inspired by the Vietnamese developer community's love for humor and code
- Built with β€οΈ for developers who enjoy a bit of trolling with their terminal
- Special thanks to all contributors and users
Made with π» and β by hieudnm
"Code smarter, laugh harder!" π