Fixed bug with the daypercentage module

Bug occured when the hour was single digit, so we now remove preceding
0s
This commit is contained in:
Your Name 2021-11-02 09:57:31 +00:00
parent c00842f1a2
commit 747bddd93a
5 changed files with 1 additions and 1 deletions

0
modules/day_of_week Normal file → Executable file
View file

View file

@ -6,7 +6,7 @@ PREFIX=' '
get_daypercentage() 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')%" echo "$PREFIX$(echo $[ $MINUTES * 100 / 1440 ] | sed 's/\..*//g')%"
} }

0
modules/default_shell Normal file → Executable file
View file

0
modules/os-release Normal file → Executable file
View file

0
modules/process_count Normal file → Executable file
View file