aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-09-24 18:53:33 +0300
committerDylan Araps <dylan.araps@gmail.com>2019-09-24 18:53:33 +0300
commitb34d0b90ea62e8a1d29e516e37a0cdbd888ca68c (patch)
tree3ec5c8c9262ae81c063ea1262f7d4b4a6a24fb76
parent497a6613227178b8fcf6d2c698a927570bb17c35 (diff)
downloadpfetch-b34d0b90ea62e8a1d29e516e37a0cdbd888ca68c.tar.gz
pfetch: clean
-rwxr-xr-xpfetch13
1 files changed, 5 insertions, 8 deletions
diff --git a/pfetch b/pfetch
index fb761a9..1cb4a4d 100755
--- a/pfetch
+++ b/pfetch
@@ -75,14 +75,8 @@ log() {
#
# 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' \
- "${ascii_width:--1}" \
- "${PF_COL1:-4}" \
- "$1" \
- "$PF_SEP" \
- "${PF_COL2:-7}" \
- "${#1}" \
- "${PF_ALIGN:-$((info_length + 1))}" \
- "$2"
+ "${ascii_width:--1}" "${PF_COL1:-4}" "$1" "$PF_SEP" \
+ "${PF_COL2:-7}" "${#1}" "${PF_ALIGN:-$info_length}" "$2"
# Keep track of the number of times 'log()' has been run.
: $((info_height+=1))
@@ -492,6 +486,9 @@ main() {
info_length=$((${#info} > info_length ? ${#info} : info_length))
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.
for info; do
"get_$info"