You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
I was wondering if it would be possible to align the printout of the title: value output on the separator? It tends to make things a bit easier to parse going down the list if there is a clean line between title and value.
I am attaching a rudimentary bash example to show a possible solution. I'm sure there is a smarter way to do this. But this was the quickest way I could find to show an example of the desired output.
Neofetch version
Neofetch 7.0.0
Screenshot
current output:
example desired output:
Possible fix
Example code:
cat padding.sh
#!/bin/bash
# Get longest Title
LONGEST_TITLE=`awk '{ if (length($0) > max) {max = length($0); maxline = $0} } END { print length(maxline) }' $1`
# Basic padding is $LONGEST_TITLE number of spaces
PADDING=`printf '%0.s ' $(seq 1 $LONGEST_TITLE)`
for title in `cat $1`; do
printf "%s%s: details here\n" "${PADDING:${#title}}" $title
done
Example inputs:
cat somefile
OS
Kernel
Uptime
Packages
Shell
Theme
Icons
Terminal
CPU
GPU
Memory
Example output:
./padding.sh somefile
OS: details here
Kernel: details here
Uptime: details here
Packages: details here
Shell: details here
Theme: details here
Icons: details here
Terminal: details here
CPU: details here
GPU: details here
Memory: details here
The text was updated successfully, but these errors were encountered:
Description
I was wondering if it would be possible to align the printout of the title: value output on the separator? It tends to make things a bit easier to parse going down the list if there is a clean line between title and value.
I am attaching a rudimentary bash example to show a possible solution. I'm sure there is a smarter way to do this. But this was the quickest way I could find to show an example of the desired output.
Neofetch version
Neofetch 7.0.0
Screenshot
current output:
example desired output:
Possible fix
Example code:
Example inputs:
Example output:
The text was updated successfully, but these errors were encountered: