Files
ponytail/hooks/ponytail-statusline.sh
T
Lakshya Sharma 187acc2add ux: make the ultra statusline badge stand out (#192)
Every mode rendered in the same green, so ultra (the high-intensity mode
that deletes and challenges requirements) looked identical to lite/full at
a glance. Give the ultra badge an amber color so it's obvious you're in it.
The level is still in the badge text, so color stays a redundant cue, not
the only one.
2026-07-09 03:01:14 +02:00

19 lines
696 B
Bash

#!/usr/bin/env bash
# CLAUDE_CONFIG_DIR overrides ~/.claude, matching where the hooks write the flag (issue #34)
flag="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/.ponytail-active"
[ -f "$flag" ] || exit 0
mode=$(head -n1 "$flag" | tr -d '[:space:]')
# ultra is the high-intensity mode; flag it amber so it stands out from the
# default green at a glance. The level is still in the text, so color is a
# redundant cue, not the only one.
color=108
[ "$mode" = "ultra" ] && color=173
if [ -z "$mode" ] || [ "$mode" = "full" ]; then
printf '\033[38;5;%sm[PONYTAIL]\033[0m' "$color"
else
printf '\033[38;5;%sm[PONYTAIL:%s]\033[0m' "$color" "$(printf '%s' "$mode" | tr '[:lower:]' '[:upper:]')"
fi