make fastfetch output centered #1530
ingenarel
started this conversation in
Show and tell
Replies: 1 comment
-
@ingenarel, I gotchu - fastfetch --logo-padding-left $(( ($(tput cols) - \
$(fastpitch --colors-block-range-start 0 --colors-block-range-end 0 --pipe |\
cat -t | awk "/^\^/ {print}" |\
sed -E "s/\^\[\[([[:digit:]]+)C/\1 /g" |\
awk "{print $1 + length - length($1)}" |\
sort -n -r |\
head -n 1)) / 2 )) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
fastfetch --logo-padding-left $(( ( $(tput cols) - 93) / 2 ))
tput cols gets the terminal width in chars
93 should be your fastfetch width, in my case, the width of this line was 93 chars:
Disk (/mnt/G): 208.61 GiB / 210.81 GiB (99%) - fuseblk
and dividing it by 2 gets us the ammount needed for the padding!
i'm pretty sure that there's a way to find out the max width of a fetch logo, but i couldn't figure out a way. yet...
Beta Was this translation helpful? Give feedback.
All reactions