claude status

This commit is contained in:
David Chen 2025-08-15 11:12:38 -05:00
parent 955c0656e6
commit 8fd95dbf47
2 changed files with 15 additions and 6 deletions

View file

@ -0,0 +1,8 @@
#!/bin/bash
# Read the JSON input from stdin
input=$(cat)
# Pass the input to both commands and concatenate their outputs
echo "$input" | ccusage statusline
echo "$input" | ccstatusline

View file

@ -1,7 +1,8 @@
{
"model": "opusplan",
"statusLine": {
"type": "command",
"command": "printf '%s | %s | %s' \"$(ccusage statusline | tr -d '\\n')\" \"$(pwd | sed \"s|$HOME|~|\" | sed 's|.*/\\([^/]*/[^/]*\\)$|\\1|')\" \"$(git status --porcelain 2>/dev/null | awk 'BEGIN{staged=0; modified=0; untracked=0} /^M/{staged++} /^.M/{modified++} /^\\?\\?/{untracked++} END{if(staged+modified+untracked>0) printf \"git: %s%s%s\", (staged>0?staged\"s\":\"\"),(modified>0?modified\"m\":\"\"),(untracked>0?untracked\"u\":\"\"); else printf \"git: clean\"}' || printf 'not a git repo')\""
}
}
"model": "opusplan",
"statusLine": {
"type": "command",
"command": "bash ~/.config/claude/scripts/statusline.sh",
"padding": 0
}
}