From 82b9e6bf2fc0faf21d68f3d284b4a67d7ed87ee9 Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Tue, 11 Aug 2026 16:10:50 +0200 Subject: [PATCH] fix local issue with real numbers --- profile.d/rain.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/profile.d/rain.sh b/profile.d/rain.sh index 65f529e..0a1f4ca 100644 --- a/profile.d/rain.sh +++ b/profile.d/rain.sh @@ -134,10 +134,10 @@ _rain_normalize_speed() return 1 fi - if awk -v s="$raw_speed" 'BEGIN { exit !(s < 1) }'; then + if LC_ALL=C awk -v s="$raw_speed" 'BEGIN { exit !(s < 1) }'; then printf "%s" "$raw_speed" else - awk -v s="$raw_speed" 'BEGIN { printf "%.3f", s / 100 }' + LC_ALL=C awk -v s="$raw_speed" 'BEGIN { printf "%.3f", s / 100 }' fi } @@ -253,10 +253,10 @@ _rain_engine() # Adapt cadence and density to terminal size for smoother rendering. if ((term_area < 1200)); then ((max_rain_width = term_area / 4)) - frame_sleep=$(awk -v s="$step_duration" 'BEGIN { printf "%.3f", s * 1.15 }') + frame_sleep=$(LC_ALL=C awk -v s="$step_duration" 'BEGIN { printf "%.3f", s * 1.15 }') elif ((term_area > 5000)); then ((max_rain_width = term_area / 2)) - frame_sleep=$(awk -v s="$step_duration" 'BEGIN { printf "%.3f", s * 0.85 }') + frame_sleep=$(LC_ALL=C awk -v s="$step_duration" 'BEGIN { printf "%.3f", s * 0.85 }') else frame_sleep="$step_duration" fi