aboutsummaryrefslogtreecommitdiff
path: root/modules/daypercentage
diff options
context:
space:
mode:
Diffstat (limited to 'modules/daypercentage')
-rwxr-xr-xmodules/daypercentage2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/daypercentage b/modules/daypercentage
index 0b7b426..5a2316f 100755
--- a/modules/daypercentage
+++ b/modules/daypercentage
@@ -6,7 +6,7 @@ PREFIX=' '
get_daypercentage()
{
- MINUTES="$[$(date +%R | cut -d ':' -f1) * 60 + $(date +%R | cut -d ':' -f2) ]"
+ MINUTES="$[$(date +%R | cut -d ':' -f1 | sed 's/^0*//') * 60 + $(date +%R | cut -d ':' -f2) ]"
echo "$PREFIX$(echo $[ $MINUTES * 100 / 1440 ] | sed 's/\..*//g')%"
}