Commit 3945cd1525d2

Vincent Demeester <vincent@sbr.pm>
2026-01-14 09:31:07
feat(claude): add dynamic user and hostname to statusline
- Display actual system user instead of hardcoded name - Show hostname for multi-machine context awareness - Format as user@hostname matching shell conventions Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent a2aed29
Changed files (1)
dots
.config
dots/.config/claude/statusline.sh
@@ -14,6 +14,7 @@ input=$(cat)
 current_dir=$(echo "$input" | jq -r '.workspace.current_dir')
 model_name=$(echo "$input" | jq -r '.model.display_name')
 dir_name=$(basename "$current_dir")
+hostname=$(hostname -s)
 
 # Colors (simple ANSI for terminal compatibility)
 PURPLE='\033[35m'
@@ -46,9 +47,9 @@ if [ -d "$claude_dir/agents" ]; then
 	agents_count=$(find -L "$claude_dir/agents" -maxdepth 1 -name "*.md" 2>/dev/null | wc -l | tr -d ' ')
 fi
 
-# LINE 1: Identity, model, context, directory
+# LINE 1: Identity, hostname, model, context, directory
 # shellcheck disable=SC2059
-printf "👋 ${PURPLE}Vincent${RESET} • ${BLUE}${model_name}${RESET} • ${context} • ${CYAN}${dir_name}${RESET}\n"
+printf "👋 ${PURPLE}${USER}${RESET}@${GREEN}${hostname}${RESET} • ${BLUE}${model_name}${RESET} • ${context} • ${CYAN}${dir_name}${RESET}\n"
 
 # LINE 2: Capabilities
 # shellcheck disable=SC2059