From 3f109c245a2906ea9ab06bc0ba236b2c102d7a6a Mon Sep 17 00:00:00 2001 From: Amolith Date: Tue, 2 Dec 2025 16:48:18 -0700 Subject: [PATCH] refactor(quota): swap percent fg/bg colors Assisted-by: Claude Opus 4.5 via Crush --- functions/synu.fish | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/functions/synu.fish b/functions/synu.fish index 666dff9689d6b52b5ac709b2ebf8500405fdcb64..416189d4d8e4a7a3ba869560f74975e4d4a90469 100644 --- a/functions/synu.fish +++ b/functions/synu.fish @@ -16,13 +16,13 @@ function synu --description "Universal agent wrapper with Synthetic API quota tr set -l percent_used (math -s0 "$requests * 100 / $limit") printf "Usage: " if test $percent_used -lt 33 - set_color green + set_color -b green black else if test $percent_used -lt 67 - set_color yellow + set_color -b yellow black else - set_color red + set_color -b red black end - printf "%s%%" $percent_used + printf " %s%% " $percent_used set_color normal printf " (%s/%s remaining)\n" $remaining $limit return 0 @@ -168,13 +168,13 @@ function synu --description "Universal agent wrapper with Synthetic API quota tr # Determine color based on usage percentage # Green: <33%, Yellow: 33-66%, Red: >66% if test $percent_used -lt 33 - set_color green + set_color -b green black else if test $percent_used -lt 67 - set_color yellow + set_color -b yellow black else - set_color red + set_color -b red black end - printf "%s%%" $percent_used + printf " %s%% " $percent_used set_color normal printf " (%s/%s remaining)\n" $remaining $limit