Okay, let's configure the Pure prompt to look great with the Snazzy terminal color scheme. Snazzy typically features a dark background with vibrant blues, magentas, cyans, greens, and yellows.
The key is to use Zsh's named colors (%F{color_name}) which will automatically pick up the specific shades defined in your Snazzy terminal profile.
Here are a couple of options you can add to your ~/.zshrc file. Place these lines before you initialize the prompt (prompt pure or similar command if you're using a framework).
Option 1: Vibrant & Common Snazzy Colors
This option uses common Snazzy highlight colors like magenta, cyan, blue, and yellow effectively.
zsh
# ~/.zshrc
# --- Pure Prompt Colors for Snazzy Terminal ---
# Load promptfunctions if not already loaded (needed for %F{} colors)
autoload -U promptinit && promptinit
# Use Zsh color names (maps to terminal configured colors)
# Reference: black, red, green, yellow, blue, magenta, cyan, white
# Also often available: bright_black (grey), bright_red, etc.
export PURE_PROMPT_SYMBOL="%F{magenta}❯%f" # Prompt symbol in magenta
export PURE_PROMPT_VICMD_SYMBOL="%F{cyan}❮%f" # Vi-mode symbol in cyan
export PURE_COLOR_PATH="%F{blue}" # Path in blue
export PURE_COLOR_GIT_BRANCH="%F{cyan}" # Git branch in cyan
export PURE_COLOR_GIT_ACTION="%F{cyan}" # Git action (rebase etc.) in cyan
export PURE_COLOR_GIT_DIRTY="%F{yellow}" # Uncommitted changes indicator in yellow
export PURE_COLOR_GIT_STAGED="%F{green}" # Staged changes indicator in green
export PURE_COLOR_GIT_UNPULLED="%F{red}" # Commits behind remote indicator in red (warning)
export PURE_COLOR_GIT_UNPUSHED="%F{yellow}" # Commits ahead of remote indicator in yellow
export PURE_COLOR_EXIT_CODE="%F{red}" # Non-zero exit code indicator in red
export PURE_COLOR_VIRTUALENV="%F{blue}" # Python VirtualEnv name in blue
export PURE_COLOR_CMD_EXECUTION_TIME="%F{bright_black}" # Command execution time in grey
# Ensure Pure is loaded *after* setting these variables
# Example if using antigen/zplug/manually:
# antigen bundle sindresorhus/pure
# or:
# fpath+=$HOME/.zsh/pure
# autoload -U promptinit; promptinit
# prompt pure
Option 2: Slightly Different Emphasis
This version changes a few colors, perhaps making the Git branch yellow and using magenta more for Git actions.
zsh
# ~/.zshrc
# --- Pure Prompt Colors for Snazzy Terminal (Alternative) ---
# Load promptfunctions if not already loaded
autoload -U promptinit && promptinit
# Use Zsh color names
export PURE_PROMPT_SYMBOL="%F{cyan}❯%f" # Prompt symbol in cyan
export PURE_PROMPT_VICMD_SYMBOL="%F{magenta}❮%f" # Vi-mode symbol in magenta
export PURE_COLOR_PATH="%F{blue}" # Path in blue (often good choice)
export PURE_COLOR_GIT_BRANCH="%F{yellow}" # Git branch in yellow
export PURE_COLOR_GIT_ACTION="%F{magenta}" # Git action (rebase etc.) in magenta
export PURE_COLOR_GIT_DIRTY="%F{yellow}" # Uncommitted changes indicator in yellow
export PURE_COLOR_GIT_STAGED="%F{green}" # Staged changes indicator in green
export PURE_COLOR_GIT_UNPULLED="%F{red}" # Commits behind remote indicator in red
export PURE_COLOR_GIT_UNPUSHED="%F{cyan}" # Commits ahead of remote indicator in cyan
export PURE_COLOR_EXIT_CODE="%F{red}" # Non-zero exit code indicator in red
export PURE_COLOR_VIRTUALENV="%F{magenta}" # Python VirtualEnv name in magenta
export PURE_COLOR_CMD_EXECUTION_TIME="%F{bright_black}" # Command execution time in grey
# Ensure Pure is loaded *after* setting these variables
# ... (same loading method as Option 1) ...
Explanation:
autoload -U promptinit && promptinit: Ensures the Zsh functions for handling prompt colors (%F{...}) are loaded. You might already have this if using a framework like Oh My Zsh.
export PURE_COLOR_...="...": Sets environment variables that Pure reads to determine colors.
%F{color_name}: Tells Zsh to start using the specified named color (e.g., blue, magenta, red). These names map directly to the colors configured in your Snazzy terminal profile.
%f: Tells Zsh to revert to the default foreground color.
bright_black: This often corresponds to the grey color in many terminal themes, including Snazzy-like ones.
How to Apply:
Open your Zsh configuration file: nano ~/.zshrc (or use your preferred editor).
Paste one of the configuration blocks above into the file. Important: Make sure these export lines appear before the line that loads/initializes the Pure prompt (e.g., prompt pure, antigen bundle ..., zplug ...).
Save the file (e.g., Ctrl+X, then Y, then Enter in nano).
Restart your terminal or run source ~/.zshrc for the changes to take effect.
Choose the option you prefer, or mix and match elements from both! The beauty of using named colors is that the prompt will adapt perfectly to the exact shades defined in your Snazzy profile.