Skip to content
Shell

feat: extend salmon color to all feature branch prefixes

Eddie Belavalbef8ed4e7184
diff --git a/statusline.sh b/statusline.sh
deleted file mode 100755
index 0bbb443..0000000
--- a/statusline.sh
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/bash
-# Claude Code Status Line
-# Displays: hostname | directory | git branch | model | Comet status | test status | costs
-
-# Read JSON input from stdin
-input=$(cat)
-
-# ============================================================================
-# HELPER FUNCTIONS
-# ============================================================================
-
-# Extract JSON values
-get_model_name() { echo "$input" | jq -r '.model.display_name' | sed 's/Claude //' | sed 's/ Sonnet//'; }
-get_current_dir() { echo "$input" | jq -r '.workspace.current_dir'; }
-get_output_style() { echo "$input" | jq -r '.output_style.name'; }
-get_cost() { echo "$input" | jq -r '.cost.total_cost_usd'; }
-get_lines_added() { echo "$input" | jq -r '.cost.total_lines_added'; }
-get_lines_removed() { echo "$input" | jq -r '.cost.total_lines_removed'; }
-
-# ============================================================================
-# STATUS COMPONENTS
-# ============================================================================
-
-# Basic info
-hostname=$(hostname -s)
-timestamp=$(date +%H:%M:%S)
-cwd=$(get_current_dir)
-cwd_display="${cwd/#$HOME/~}"
-model=$(get_model_name)
-output_style=$(get_output_style)
-
-# Git status
-git_info=""
-if git -C "$cwd" rev-parse --git-dir > /dev/null 2>&1; then
- branch=$(git -C "$cwd" --no-optional-locks branch --show-current 2>/dev/null)
- if ! git -C "$cwd" --no-optional-locks diff-index --quiet HEAD 2>/dev/null; then
- git_status="*"
- else
- git_status=""
- fi
-
- # Only color feature branches in salmon
- if [[ "$branch" == feature/* ]]; then
- salmon=$(printf '\033[38;5;210m')
- reset=$(printf '\033[0m')
- git_info=" (${salmon}${branch}${git_status}${reset})"
- else
- git_info=" (${branch}${git_status})"
- fi
-fi
-
-# Comet browser status (check if debug port is open)
-comet_status=""
-if lsof -i :9222 > /dev/null 2>&1; then
- green=$(printf '\033[38;5;34m')
- reset=$(printf '\033[0m')
- comet_status=" ${green}🌐${reset}"
-fi
-
-# Test status (if helper script exists)
-test_status=""
-if [ -f ~/.claude/helpers/get-test-status.sh ]; then
- test_result=$(~/.claude/helpers/get-test-status.sh "$cwd" 2>/dev/null)
- if [ -n "$test_result" ]; then
- test_status=" $test_result"
- fi
-fi
-
-# Cost tracking
-cost=$(get_cost)
-cost_display=""
-if [ "$cost" != "null" ] && [ "$cost" != "0" ]; then
- lines_added=$(get_lines_added)
- lines_removed=$(get_lines_removed)
- yellow=$(printf '\033[38;5;220m')
- reset=$(printf '\033[0m')
-
- # Format cost
- cost_str=$(printf "%.4f" "$cost")
- cost_display=" ${yellow}💰\$${cost_str}${reset}"
-
- # Add line changes if available
- if [ "$lines_added" != "null" ] && [ "$lines_added" != "0" ]; then
- cost_display="${cost_display} ${yellow}(+${lines_added}/-${lines_removed})${reset}"
- fi
-fi
-
-# ============================================================================
-# BUILD STATUS LINE
-# ============================================================================
-
-status="${hostname}@${timestamp} | ${cwd_display}${git_info} | ${model}"
-
-# Add output style if not default
-if [ "$output_style" != "default" ] && [ "$output_style" != "null" ]; then
- status="${status} | ${output_style}"
-fi
-
-# Add optional components
-status="${status}${comet_status}${test_status}${cost_display}"
-
-# Output the final status line
-printf "%s" "$status"
diff --git a/statusline.sh b/statusline.sh
new file mode 120000
index 0000000..ca75a32
--- /dev/null
+++ b/statusline.sh
@@ -0,0 +1 @@
+/Users/eddiebelaval/dotfiles/claude/statusline.sh
\ No newline at end of file