mirror of
https://github.com/theniceboy/.config.git
synced 2025-12-31 02:05:00 +08:00
7 lines
No EOL
582 B
JSON
7 lines
No EOL
582 B
JSON
{
|
|
"model": "opusplan",
|
|
"statusLine": {
|
|
"type": "command",
|
|
"command": "printf '%s | %s | %s' \"$(bun x 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')\""
|
|
}
|
|
} |