add claude
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Read",
|
||||
"Glob",
|
||||
"Grep",
|
||||
"WebSearch",
|
||||
"WebFetch",
|
||||
"Bash(rg:*)",
|
||||
"Bash(ls:*)",
|
||||
"Bash(fd:*)",
|
||||
"Bash(find:*)",
|
||||
"Bash(pwd:*)",
|
||||
"Bash(cat:*)",
|
||||
"Bash(head:*)",
|
||||
"Bash(tail:*)",
|
||||
"Bash(wc:*)",
|
||||
"Bash(echo:*)",
|
||||
"Bash(sort:*)",
|
||||
"Bash(diff:*)",
|
||||
"Bash(git log:*)",
|
||||
"Bash(git diff:*)",
|
||||
"Bash(git show:*)",
|
||||
"Bash(git status:*)"
|
||||
]
|
||||
},
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "~/.claude/statusline.sh"
|
||||
},
|
||||
"autoMemoryEnabled": false,
|
||||
"theme": "auto",
|
||||
"editorMode": "vim"
|
||||
}
|
||||
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
input=$(cat)
|
||||
|
||||
MODEL=$(echo "$input" | jq -r '.model.display_name // "unknown"')
|
||||
COST=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
|
||||
EFFORT=$(echo "$input" | jq -r '.effort.level // "—"')
|
||||
PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
|
||||
|
||||
COST_FMT=$(printf '$%.4f' "$COST")
|
||||
|
||||
# Context bar (10 blocks)
|
||||
FILLED=$((PCT / 10))
|
||||
EMPTY=$((10 - FILLED))
|
||||
BAR=$(printf '%0.s█' $(seq 1 $FILLED 2>/dev/null))$(printf '%0.s░' $(seq 1 $EMPTY 2>/dev/null))
|
||||
|
||||
echo "$MODEL | effort:$EFFORT | ctx:$BAR${PCT}% | $COST_FMT"
|
||||
|
||||
Reference in New Issue
Block a user