Initial commit: Fresh start with current state
This commit is contained in:
30
.claude/statusline.sh
Normal file
30
.claude/statusline.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user