#!/usr/bin/env bash # Claude Code Custom Status Line # This script generates the custom status line display # Get current directory (show last 2 path segments) CURRENT_DIR=$(pwd | awk -F/ '{print $(NF-1)"/"$NF}') # Get git branch if in a git repo GIT_BRANCH=$(git branch 2>/dev/null | grep '^\*' | sed 's/^\* //') if [ -n "$GIT_BRANCH" ]; then GIT_INFO=" 🌿 $GIT_BRANCH" else GIT_INFO="" fi # Get current time CURRENT_TIME=$(date +"%H:%M") # Check if there are uncommitted changes if git diff-index --quiet HEAD -- 2>/dev/null; then GIT_STATUS="" else GIT_STATUS=" ●" fi # Output status line in format Claude expects # Left side: directory and git info # Right side: time echo "📁 $CURRENT_DIR$GIT_INFO$GIT_STATUS | 🕐 $CURRENT_TIME"