mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-11-09 14:19:43 +00:00
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:
parent
c00842f1a2
commit
747bddd93a
5 changed files with 1 additions and 1 deletions
0
modules/day_of_week
Normal file → Executable file
0
modules/day_of_week
Normal file → Executable 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
0
modules/default_shell
Normal file → Executable file
0
modules/os-release
Normal file → Executable file
0
modules/os-release
Normal file → Executable file
0
modules/process_count
Normal file → Executable file
0
modules/process_count
Normal file → Executable file
Loading…
Reference in a new issue