@andrewkent/claude-statusline 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/statusline.sh +6 -3
- package/package.json +1 -1
package/assets/statusline.sh
CHANGED
|
@@ -715,12 +715,13 @@ if [ -n "$usage_data" ] && echo "$usage_data" | jq -e . >/dev/null 2>&1; then
|
|
|
715
715
|
"extra_limit_raw=" + (.extra_usage.monthly_limit // 0 | tostring | @sh)
|
|
716
716
|
' 2>/dev/null)"
|
|
717
717
|
|
|
718
|
+
five_hour_pct_display=$(printf "%.1f" "$five_hour_pct" 2>/dev/null || echo "0.0")
|
|
718
719
|
five_hour_pct=$(printf "%.0f" "$five_hour_pct" 2>/dev/null || echo 0)
|
|
719
720
|
five_hour_reset=$(format_reset_time "$five_hour_reset_iso" "time")
|
|
720
721
|
five_hour_bar=$(build_bar "$five_hour_pct" "$bar_width")
|
|
721
722
|
five_hour_pct_color=$(color_for_pct "$five_hour_pct")
|
|
722
723
|
|
|
723
|
-
rate_lines+="${white}$(printf "%-7s" "current")${reset} ${five_hour_bar} ${five_hour_pct_color}$(printf "%
|
|
724
|
+
rate_lines+="${white}$(printf "%-7s" "current")${reset} ${five_hour_bar} ${five_hour_pct_color}$(printf "%5s" "$five_hour_pct_display")%${reset}"
|
|
724
725
|
[ -n "$five_hour_reset" ] && rate_lines+=" ${white}${five_hour_reset}${reset}"
|
|
725
726
|
|
|
726
727
|
# ── Burn-down projection ──────────────────────────
|
|
@@ -775,12 +776,13 @@ if [ -n "$usage_data" ] && echo "$usage_data" | jq -e . >/dev/null 2>&1; then
|
|
|
775
776
|
fi
|
|
776
777
|
fi
|
|
777
778
|
|
|
779
|
+
seven_day_pct_display=$(printf "%.1f" "$seven_day_pct_raw" 2>/dev/null || echo "0.0")
|
|
778
780
|
seven_day_pct=$(printf "%.0f" "$seven_day_pct_raw" 2>/dev/null || echo 0)
|
|
779
781
|
seven_day_reset=$(format_reset_time "$seven_day_reset_iso" "datetime")
|
|
780
782
|
seven_day_bar=$(build_bar "$seven_day_pct" "$bar_width")
|
|
781
783
|
seven_day_pct_color=$(color_for_pct "$seven_day_pct")
|
|
782
784
|
|
|
783
|
-
rate_lines+="\n${white}$(printf "%-7s" "weekly")${reset} ${seven_day_bar} ${seven_day_pct_color}$(printf "%
|
|
785
|
+
rate_lines+="\n${white}$(printf "%-7s" "weekly")${reset} ${seven_day_bar} ${seven_day_pct_color}$(printf "%5s" "$seven_day_pct_display")%${reset}"
|
|
784
786
|
[ -n "$seven_day_reset" ] && rate_lines+=" ${white}${seven_day_reset}${reset}"
|
|
785
787
|
|
|
786
788
|
# ── Weekly burn-down projection ──────────────────
|
|
@@ -851,13 +853,14 @@ if [ -n "$usage_data" ] && echo "$usage_data" | jq -e . >/dev/null 2>&1; then
|
|
|
851
853
|
|
|
852
854
|
# Extra usage credits
|
|
853
855
|
if [ "$extra_enabled" = "true" ]; then
|
|
856
|
+
extra_pct_display=$(printf "%.1f" "$extra_pct_raw" 2>/dev/null || echo "0.0")
|
|
854
857
|
extra_pct=$(printf "%.0f" "$extra_pct_raw" 2>/dev/null || echo 0)
|
|
855
858
|
extra_used=$(awk "BEGIN {printf \"%.2f\", $extra_used_raw / 100}" 2>/dev/null)
|
|
856
859
|
extra_limit=$(awk "BEGIN {printf \"%.2f\", $extra_limit_raw / 100}" 2>/dev/null)
|
|
857
860
|
extra_bar=$(build_bar "$extra_pct" "$bar_width")
|
|
858
861
|
extra_pct_color=$(color_for_pct "$extra_pct")
|
|
859
862
|
|
|
860
|
-
rate_lines+="\n${white}$(printf "%-7s" "extra")${reset} ${extra_bar} ${extra_pct_color}$(printf "%
|
|
863
|
+
rate_lines+="\n${white}$(printf "%-7s" "extra")${reset} ${extra_bar} ${extra_pct_color}$(printf "%5s" "$extra_pct_display")%${reset} ${white}\$${extra_used}${dim}/${reset}${white}\$${extra_limit}${reset}"
|
|
861
864
|
fi
|
|
862
865
|
fi
|
|
863
866
|
|