From 5090340189f6075cfa167a0a4263b1f3e2b90a0b Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 13 Jul 2023 02:02:25 +0000 Subject: [PATCH] sxmo: battery_estimate: zero-pad the minutes --- hosts/modules/gui/sxmo/battery_estimate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/modules/gui/sxmo/battery_estimate b/hosts/modules/gui/sxmo/battery_estimate index 0c4afc23..8183354e 100755 --- a/hosts/modules/gui/sxmo/battery_estimate +++ b/hosts/modules/gui/sxmo/battery_estimate @@ -16,7 +16,7 @@ fmt_minutes() { hr=$(($2 / 60)) hr_in_min=$(($hr * 60)) min=$(($2 - $hr_in_min)) - echo "$1 ${hr}h${min}m" + printf "%s %dh%02dm" "$1" "$hr" "$min" fi }