Catppuccin Mocha Theme - Statuslines
Soothing Catppuccin Mocha theme statusline with 26 pastel colors, Powerline separators, and modular segments for Git, model info, and token tracking.
Open the source and read safety notes before installing.
Prerequisites
- Claude Code CLI installed and configured
- Bash shell available (bash 4.0+ recommended for string manipulation)
- jq command-line JSON processor (jq 1.6+ recommended for safe extraction with // defaults)
- Terminal with 256-color mode support (required for accurate Catppuccin Mocha palette reproduction)
- Nerd Font installed and configured (required for Powerline separator glyphs: U+E0B0-U+E0B3)
- Git command-line tool (optional, for Git branch segment display)
Schema details
- Install type
- config
- Reading time
- 2 min
- Difficulty score
- 4
- Troubleshooting
- Yes
- Breaking changes
- No
- Scope
- Source repo
- Stars
- 19,184 source repo stars
- Forks
- 352
- Updated
- 2026-05-19T11:04:59Z
- Script language
- bash
Script body
#!/usr/bin/env bash
# Catppuccin Mocha Theme Statusline for Claude Code
# Official Catppuccin Mocha color palette (26 colors)
# https://github.com/catppuccin/catppuccin
# Read JSON from stdin
read -r input
# Extract values
model=$(echo "$input" | jq -r '.model // "unknown"')
dir=$(echo "$input" | jq -r '.workspace.path // "~"' | sed "s|$HOME|~|")
tokens=$(echo "$input" | jq -r '.session.totalTokens // 0')
git_branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")
# Catppuccin Mocha Palette (256-color approximations)
# Base colors
BASE="\033[48;5;235m" # #1e1e2e
MANTLE="\033[48;5;234m" # #181825
CRUST="\033[48;5;233m" # #11111b
# Text colors
TEXT="\033[38;5;205m" # #cdd6f4
SUBTEXT1="\033[38;5;189m" # #bac2de
SUBTEXT0="\033[38;5;146m" # #a6adc8
# Accent colors
LAVENDER="\033[48;5;183m" # #b4befe
BLUE="\033[48;5;117m" # #89b4fa
SAPPHIRE="\033[48;5;116m" # #74c7ec
SKY="\033[48;5;153m" # #89dceb
TEAL="\033[48;5;152m" # #94e2d5
GREEN="\033[48;5;151m" # #a6e3a1
YELLOW="\033[48;5;229m" # #f9e2af
PEACH="\033[48;5;216m" # #fab387
MARRON="\033[48;5;217m" # #eba0ac
RED="\033[48;5;210m" # #f38ba8
MAUVE="\033[48;5;183m" # #cba6f7
PINK="\033[48;5;218m" # #f5c2e7
FLAMINGO="\033[48;5;217m" # #f2cdcd
ROSEWATER="\033[48;5;224m"# #f5e0dc
# Foreground versions
LAVENDER_FG="\033[38;5;183m"
BLUE_FG="\033[38;5;117m"
SAPPHIRE_FG="\033[38;5;116m"
TEAL_FG="\033[38;5;152m"
PEACH_FG="\033[38;5;216m"
RESET="\033[0m"
SEP="\ue0b0" # Powerline separator
# Build statusline
statusline=""
# Model segment (Lavender)
statusline+="${LAVENDER}${RESET}${TEXT} ${model} ${RESET}"
statusline+="${LAVENDER_FG}${SEP}${RESET}"
# Directory segment (Blue)
statusline+=" ${BLUE}${RESET}${TEXT} ${dir} ${RESET}"
statusline+="${BLUE_FG}${SEP}${RESET}"
# Git branch segment (Teal) - only if in git repo
if [ -n "$git_branch" ]; then
statusline+=" ${TEAL}${RESET}${TEXT} ${git_branch} ${RESET}"
statusline+="${TEAL_FG}${SEP}${RESET}"
fi
# Token count segment (Peach)
statusline+=" ${PEACH}${RESET}${TEXT} ${tokens} ${RESET}"
statusline+="${PEACH_FG}${SEP}${RESET}"
echo -e "$statusline"Full copyable content
{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/catppuccin-mocha-theme.sh",
"refreshInterval": 500
}
}About this resource
Features
- Official Catppuccin Mocha color palette with 26 eye-candy colors
- Powerline-style separators for seamless segment transitions
- Modular segments: model, directory, Git branch, token count
- Pastel aesthetics optimized for long coding sessions
- Git integration with branch display
- Nerd Font icons for visual clarity
- Conditional rendering (Git segment only in repositories)
- 256-color terminal support for accurate palette reproduction
Use Cases
- Developers already using Catppuccin theme in editor/terminal
- Users preferring soothing pastel aesthetics over harsh neon
- Teams standardizing on Catppuccin design system
- Visual continuity across Neovim, tmux, and Claude Code
- Reducing eye strain during extended AI-assisted coding sessions
- Accessibility-friendly color schemes for low-light environments
Requirements
- Claude Code CLI installed and configured
- Bash shell available (bash 4.0+ recommended for string manipulation)
- jq command-line JSON processor (jq 1.6+ recommended for safe extraction with // defaults)
- Terminal with 256-color mode support (required for accurate Catppuccin Mocha palette reproduction)
- Nerd Font installed and configured (required for Powerline separator glyphs: U+E0B0-U+E0B3)
- Git command-line tool (optional, for Git branch segment display)
Configuration
{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/catppuccin-mocha-theme.sh",
"refreshInterval": 500
}
}
Examples
Enhanced Catppuccin Mocha with Cost Display
Extended version with cost information and additional segments
#!/usr/bin/env bash
# Enhanced Catppuccin Mocha Theme with Cost Display
input=$(cat)
model=$(echo "$input" | jq -r '.model.id // .model.display_name // "unknown"')
dir=$(echo "$input" | jq -r '.workspace.current_dir // "~"' | sed "s|$HOME|~|")
tokens=$(echo "$input" | jq -r '.session.totalTokens // 0')
cost=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
git_branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")
# Catppuccin Mocha colors
BASE="\033[48;5;235m"
TEXT="\033[38;5;205m"
LAVENDER="\033[48;5;183m"
BLUE="\033[48;5;117m"
TEAL="\033[48;5;152m"
PEACH="\033[48;5;216m"
GREEN="\033[48;5;151m"
LAVENDER_FG="\033[38;5;183m"
BLUE_FG="\033[38;5;117m"
TEAL_FG="\033[38;5;152m"
PEACH_FG="\033[38;5;216m"
GREEN_FG="\033[38;5;151m"
RESET="\033[0m"
SEP="\ue0b0"
statusline=""
# Model segment
statusline+="${LAVENDER}${RESET}${TEXT} ${model} ${RESET}"
statusline+="${LAVENDER_FG}${SEP}${RESET}"
# Directory segment
statusline+=" ${BLUE}${RESET}${TEXT} ${dir} ${RESET}"
statusline+="${BLUE_FG}${SEP}${RESET}"
# Git branch segment
if [ -n "$git_branch" ]; then
statusline+=" ${TEAL}${RESET}${TEXT} ${git_branch} ${RESET}"
statusline+="${TEAL_FG}${SEP}${RESET}"
fi
# Token count segment
statusline+=" ${PEACH}${RESET}${TEXT} ${tokens} ${RESET}"
statusline+="${PEACH_FG}${SEP}${RESET}"
# Cost segment (Green)
if (( $(echo "$cost > 0" | bc -l 2>/dev/null || echo "0") )); then
statusline+=" ${GREEN}${RESET}${TEXT} $${cost} ${RESET}"
statusline+="${GREEN_FG}${SEP}${RESET}"
fi
echo -e "$statusline"
Catppuccin Mocha with Custom Segment Order
Configurable segment order via environment variables
#!/usr/bin/env bash
# Catppuccin Mocha Theme with Custom Segment Order
SEGMENT_ORDER=${CATPPUCCIN_SEGMENT_ORDER:-"model,dir,git,tokens"}
input=$(cat)
model=$(echo "$input" | jq -r '.model.id // .model.display_name // "unknown"')
dir=$(echo "$input" | jq -r '.workspace.current_dir // "~"' | sed "s|$HOME|~|")
tokens=$(echo "$input" | jq -r '.session.totalTokens // 0')
git_branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")
# Catppuccin Mocha colors
TEXT="\033[38;5;205m"
LAVENDER="\033[48;5;183m"
BLUE="\033[48;5;117m"
TEAL="\033[48;5;152m"
PEACH="\033[48;5;216m"
LAVENDER_FG="\033[38;5;183m"
BLUE_FG="\033[38;5;117m"
TEAL_FG="\033[38;5;152m"
PEACH_FG="\033[38;5;216m"
RESET="\033[0m"
SEP="\ue0b0"
statusline=""
# Parse segment order and build statusline
IFS=',' read -ra SEGMENTS <<< "$SEGMENT_ORDER"
for segment in "${SEGMENTS[@]}"; do
case "$segment" in
model)
statusline+="${LAVENDER}${RESET}${TEXT} ${model} ${RESET}"
statusline+="${LAVENDER_FG}${SEP}${RESET}"
;;
dir)
statusline+=" ${BLUE}${RESET}${TEXT} ${dir} ${RESET}"
statusline+="${BLUE_FG}${SEP}${RESET}"
;;
git)
if [ -n "$git_branch" ]; then
statusline+=" ${TEAL}${RESET}${TEXT} ${git_branch} ${RESET}"
statusline+="${TEAL_FG}${SEP}${RESET}"
fi
;;
tokens)
statusline+=" ${PEACH}${RESET}${TEXT} ${tokens} ${RESET}"
statusline+="${PEACH_FG}${SEP}${RESET}"
;;
esac
done
echo -e "$statusline"
Catppuccin Mocha Theme Installation Example
Complete setup script with Nerd Font verification
#!/bin/bash
# Installation script for Catppuccin Mocha Theme
mkdir -p .claude/statuslines
# Check for Nerd Font (Powerline separators require Nerd Font)
echo "Checking for Nerd Font support..."
if echo -e "\ue0b0" | grep -q "\ue0b0"; then
echo "Nerd Font detected"
else
echo "Warning: Nerd Font may not be installed. Powerline separators may not display correctly."
echo "Install from: https://www.nerdfonts.com/"
echo "Recommended: JetBrains Mono Nerd Font, FiraCode Nerd Font"
fi
# Check terminal color support
echo "Checking terminal color support..."
if tput colors | grep -qE '^(256|[0-9]{3,})$'; then
echo "256-color mode supported"
else
echo "Warning: Terminal may not support 256 colors. Colors may appear incorrect."
fi
cat > .claude/statuslines/catppuccin-mocha-theme.sh << 'SCRIPT_EOF'
#!/usr/bin/env bash
# Paste the full statusline script from the primary example above before running this installer.
SCRIPT_EOF
chmod +x .claude/statuslines/catppuccin-mocha-theme.sh
# Add to settings.json
if [ ! -f .claude/settings.json ]; then
echo '{"statusLine":{"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/catppuccin-mocha-theme.sh","refreshInterval":500}}' > .claude/settings.json
else
jq '.statusLine = {"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/catppuccin-mocha-theme.sh","refreshInterval":500}' .claude/settings.json > .claude/settings.json.tmp
mv .claude/settings.json.tmp .claude/settings.json
fi
echo "Catppuccin Mocha Theme installed successfully!"
echo "Note: For best results, use a terminal with 256-color support and Nerd Font."
Troubleshooting
Colors look washed out or incorrect compared to official palette
Verify terminal supports 256 colors with 'tput colors' (should return 256). Enable true color if available: export COLORTERM=truecolor. Check terminal theme doesn't override ANSI colors. Verify color codes match Catppuccin Mocha palette: LAVENDER=183, BLUE=117, TEAL=152, PEACH=216. Test colors: echo -e '\033[48;5;183m LAVENDER \033[0m'.
Nerd Font icons showing as boxes or missing glyphs
Install Catppuccin-compatible Nerd Font from nerdfonts.com. Recommended: JetBrains Mono Nerd Font, FiraCode Nerd Font. Configure terminal to use installed font in preferences. Verify font includes Powerline glyphs (U+E0B0-U+E0B3). Test separator: echo -e '\ue0b0' (should show Powerline separator, not box).
Git branch not displaying even when in repository
Check Git installed: git --version. Verify you're in Git repo: git status. Ensure script has permission to execute git commands. Test manually: git rev-parse --abbrev-ref HEAD. Check error handling: git_branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo ""). Verify Git command output is not empty.
Powerline separators misaligned or overlapping text
Verify Nerd Font properly installed with Powerline glyphs (U+E0B0-U+E0B3). Test separator: echo -e '\ue0b0'. Disable font ligatures if enabled. Increase terminal line spacing if needed. Check terminal font rendering settings. Verify separator character encoding: SEP="\ue0b0" (Unicode escape).
Statusline disappears or flickers on refresh
Increase refreshInterval to 1000ms in configuration: {"refreshInterval": 1000}. Check script permissions: chmod +x statusline.sh. Verify jq installed: jq --version. Test script manually with sample JSON input. Check for syntax errors: bash -n catppuccin-mocha-theme.sh.
Model or directory showing as 'unknown' or empty
Verify JSON structure: echo '$input' | jq '.model, .workspace'. Check field names: model.id, model.display_name, workspace.current_dir, workspace.project_dir. Test extraction: echo '$input' | jq -r '.model.id // .model.display_name // "unknown"'. Verify Claude Code is passing correct JSON structure.
Token count always showing 0
Check token field exists: echo '$input' | jq '.session.totalTokens, .cost.total_tokens'. Verify field name matches: session.totalTokens or cost.total_tokens. Test extraction: echo '$input' | jq -r '.session.totalTokens // .cost.total_tokens // 0'. Check Claude Code version supports token tracking.
Statusline output showing raw ANSI codes instead of colors
Verify echo -e flag is used for escape sequence interpretation. Check terminal supports ANSI colors: echo -e '\033[38;5;183mLAVENDER\033[0m'. Some terminals require explicit color support enabled. Check TERM environment variable: echo $TERM (should include 'xterm' or '256color'). Verify terminal emulator settings for color support.
- Features
- Use Cases
- Requirements
- Configuration
- Examples
- Enhanced Catppuccin Mocha with Cost Display
- Catppuccin Mocha with Custom Segment Order
- Catppuccin Mocha Theme Installation Example
- Troubleshooting
- Colors look washed out or incorrect compared to official palette
- Nerd Font icons showing as boxes or missing glyphs
- Git branch not displaying even when in repository
- Powerline separators misaligned or overlapping text
- Statusline disappears or flickers on refresh
- Model or directory showing as 'unknown' or empty
- Token count always showing 0
Source citations
Signals
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.