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.
This commit is contained in:
@@ -13,9 +13,12 @@ try {
|
||||
}
|
||||
|
||||
$Esc = [char]27
|
||||
# ultra is the high-intensity mode; flag it amber so it stands out from the
|
||||
# default green. The level is still in the text, so color is a redundant cue.
|
||||
$Color = if ($Mode -eq "ultra") { "173" } else { "108" }
|
||||
if ([string]::IsNullOrEmpty($Mode) -or $Mode -eq "full") {
|
||||
[Console]::Write("${Esc}[38;5;108m[PONYTAIL]${Esc}[0m")
|
||||
[Console]::Write("${Esc}[38;5;${Color}m[PONYTAIL]${Esc}[0m")
|
||||
} else {
|
||||
$Suffix = $Mode.ToUpperInvariant()
|
||||
[Console]::Write("${Esc}[38;5;108m[PONYTAIL:$Suffix]${Esc}[0m")
|
||||
[Console]::Write("${Esc}[38;5;${Color}m[PONYTAIL:$Suffix]${Esc}[0m")
|
||||
}
|
||||
|
||||
@@ -5,8 +5,14 @@ flag="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/.ponytail-active"
|
||||
|
||||
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;108m[PONYTAIL]\033[0m'
|
||||
printf '\033[38;5;%sm[PONYTAIL]\033[0m' "$color"
|
||||
else
|
||||
printf '\033[38;5;108m[PONYTAIL:%s]\033[0m' "$(printf '%s' "$mode" | tr '[:lower:]' '[:upper:]')"
|
||||
printf '\033[38;5;%sm[PONYTAIL:%s]\033[0m' "$color" "$(printf '%s' "$mode" | tr '[:lower:]' '[:upper:]')"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user