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