From 313aa374b0f4f3fc9d3455c54902c7fffc45fe20 Mon Sep 17 00:00:00 2001 From: GaugeK Date: Tue, 11 Aug 2020 18:09:24 +1000 Subject: [PATCH] force 2-wide minutes/hours --- fet.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fet.sh b/fet.sh index 853b4ae..eacd772 100755 --- a/fet.sh +++ b/fet.sh @@ -74,9 +74,8 @@ cpu="${cpu% *-Core*}" ## Uptime # the simple math is shamefully stolen from aosync IFS=. read -r uptime _ < /proc/uptime -d="$((uptime / 60 / 60 / 24))" -h="$((uptime / 60 / 60 % 24))" -m="$((uptime / 60 % 60))" +d=$((uptime / 60 / 60 / 24)) +up=$(printf %02d:%02d $((uptime / 60 / 60 % 24)) $((uptime / 60 % 60))) ## Kernel read -r _ _ version _ < /proc/version @@ -109,7 +108,7 @@ print() { [ "$ID" ] && print os "$ID" [ "$SHELL" ] && print sh "${SHELL##*/}" [ "$wm" ] && print wm "$wm" -[ "$m" ] && print up "${d}d ${h}:${m}" +[ "$d" ] && print up "${d}d $up" [ "$gtk" ] && print gtk "${gtk# }" [ "$cpu" ] && print cpu "$vendor $cpu" [ "$mem" ] && print mem "${mem}MB"