Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins-claude/statusline/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "statusline",
"version": "1.1.4",
"version": "1.1.5",
"description": "Configurable status line for Claude Code — git status, model, context, API usage, cost segments with ANSI colors",
"author": {
"name": "Logan Gagne"
Expand Down
5 changes: 4 additions & 1 deletion plugins-claude/statusline/scripts/statusline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ DEFAULT_COST_THRESHOLDS=(5 20)
DEFAULT_EXTRA_HIDE_ZERO=true
DEFAULT_EXTRA_ONLY_BURNING=false
DEFAULT_CURRENCY="$"
DEFAULT_GIT_SHOW_BEHIND=true

# Default colors (256-color codes or keywords)
declare -A DEFAULT_COLORS=(
Expand Down Expand Up @@ -54,6 +55,7 @@ COST_THRESHOLDS=()
EXTRA_HIDE_ZERO=true
EXTRA_ONLY_BURNING=false
CURRENCY=""
GIT_SHOW_BEHIND=true
declare -A COLORS=()

MODEL="" CTX_PCT="" COST="" CWD="" PROJECT_DIR=""
Expand Down Expand Up @@ -151,6 +153,7 @@ load_config() {
v=$(echo "$cfg" | jq -r '.extra_hide_zero // empty' 2>/dev/null) && [[ -n "$v" ]] && EXTRA_HIDE_ZERO="$v"
v=$(echo "$cfg" | jq -r '.extra_only_burning // empty' 2>/dev/null) && [[ -n "$v" ]] && EXTRA_ONLY_BURNING="$v"
v=$(echo "$cfg" | jq -r '.currency // empty' 2>/dev/null) && [[ -n "$v" ]] && CURRENCY="$v"
v=$(echo "$cfg" | jq -r '.git_show_behind // empty' 2>/dev/null) && [[ -n "$v" ]] && GIT_SHOW_BEHIND="$v"
local ct
ct=$(echo "$cfg" | jq -r '.cost_thresholds // empty | .[]' 2>/dev/null) || true
if [[ -n "$ct" ]]; then
Expand Down Expand Up @@ -627,7 +630,7 @@ seg_git() {
((unstaged > 0)) && out+=" $(c "${COLORS[git_unstaged]}")!${unstaged}$(c reset)"
((untracked > 0)) && out+=" $(c "${COLORS[git_untracked]}")?${untracked}$(c reset)"
((ahead > 0)) && out+=" $(c "${COLORS[git_ahead]}")⇡${ahead}$(c reset)"
((behind > 0)) && out+=" $(c "${COLORS[git_behind]}")⇣${behind}$(c reset)"
[[ "$GIT_SHOW_BEHIND" == "true" ]] && ((behind > 0)) && out+=" $(c "${COLORS[git_behind]}")⇣${behind}$(c reset)"

printf '%s' "$out"
}
Expand Down
Loading