update print-epoch to make more generalizable

This commit is contained in:
Daylin Morgan 2022-09-09 11:33:50 -05:00
parent 6851fe185d
commit 4173e28c35

View file

@ -23,8 +23,12 @@ spacing() {
epoch=$(print-time "$(date +'%s')")
side=$(spacing $(((COLUMNS-(${#epoch}+6))/2)))
printf "\n\033[1m%s [ \033[1;9%dm%s\033[39m ] %s\033[0m\n" \
print-line() {
printf "\n\033[1m%s [ \033[1;9%dm%s\033[39m ] %s\033[0m\n" \
"$side" \
"$((RANDOM % 7+1))" \
"$epoch" \
"$1" \
"$side"
}
print-line "$epoch"