mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-12-22 21:22:52 +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()
|
||||
{
|
||||
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')%"
|
||||
}
|
||||
|
||||
|
|
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