mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-11-22 02:22:53 +00:00
13 lines
287 B
Bash
Executable file
13 lines
287 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Prints the percentage of the day that has been completed
|
|
|
|
PREFIX=' '
|
|
|
|
get_daypercentage()
|
|
{
|
|
MINUTES="$[$(date +%R | cut -d ':' -f1) * 60 + $(date +%R | cut -d ':' -f2) ]"
|
|
echo "$PREFIX$(echo $[ $MINUTES * 100 / 1440 ] | sed 's/\..*//g')%"
|
|
}
|
|
|
|
get_daypercentage
|