pfetch: clean

This commit is contained in:
Dylan Araps 2019-09-24 18:53:33 +03:00
parent 497a661322
commit b34d0b90ea

13
pfetch
View File

@ -75,14 +75,8 @@ log() {
# #
# This is ugly, I know! # This is ugly, I know!
printf '\033[%sC\033[3%s;1m%s\033[m%s\033[3%sm\033[%sD\033[%sC%s\033[m\n' \ printf '\033[%sC\033[3%s;1m%s\033[m%s\033[3%sm\033[%sD\033[%sC%s\033[m\n' \
"${ascii_width:--1}" \ "${ascii_width:--1}" "${PF_COL1:-4}" "$1" "$PF_SEP" \
"${PF_COL1:-4}" \ "${PF_COL2:-7}" "${#1}" "${PF_ALIGN:-$info_length}" "$2"
"$1" \
"$PF_SEP" \
"${PF_COL2:-7}" \
"${#1}" \
"${PF_ALIGN:-$((info_length + 1))}" \
"$2"
# Keep track of the number of times 'log()' has been run. # Keep track of the number of times 'log()' has been run.
: $((info_height+=1)) : $((info_height+=1))
@ -492,6 +486,9 @@ main() {
info_length=$((${#info} > info_length ? ${#info} : info_length)) info_length=$((${#info} > info_length ? ${#info} : info_length))
done done
# Add an additional space of length to act as a gap.
: $((info_length+=1))
# Iterate over the above list and run any existing "get_" functions. # Iterate over the above list and run any existing "get_" functions.
for info; do for info; do
"get_$info" "get_$info"