Add Claude Code settings and alias
- Add cc alias for claude --internet - Add Claude settings.json with plugins and statusline config - Add custom statusline.sh script with context usage display
This commit is contained in:
parent
b2b7c7db45
commit
09631b3530
3 changed files with 35 additions and 0 deletions
17
dot_claude/executable_statusline.sh
Normal file
17
dot_claude/executable_statusline.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
input=$(cat)
|
||||
|
||||
MODEL=$(echo "$input" | jq -r '.model.display_name // "Claude"')
|
||||
PERCENT_USED=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | xargs printf "%.1f")
|
||||
|
||||
# Color coding based on context usage
|
||||
if (( $(echo "$PERCENT_USED > 80" | bc -l) )); then
|
||||
COLOR="\033[31m" # Red for high usage
|
||||
elif (( $(echo "$PERCENT_USED > 50" | bc -l) )); then
|
||||
COLOR="\033[33m" # Yellow for moderate usage
|
||||
else
|
||||
COLOR="\033[32m" # Green for low usage
|
||||
fi
|
||||
RESET="\033[0m"
|
||||
|
||||
echo -e "[$MODEL] ${COLOR}Context: ${PERCENT_USED}%${RESET}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue