From 7dfa71fdf311946e4eecd68c7f2d8d5f792e4abb Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sun, 1 Jul 2012 21:35:19 +0000 Subject: [PATCH] small change, with -xx, now inxi shows one driver per line, but shows the total disk space on a separate line that makes it a bit more readable. New version number, new tarball. I debated making it one per line default as soon as -x is triggered but will leave it this way for now, with -xx you get the easier to read single line output in all cases, so that's probably good enough. --- inxi | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/inxi b/inxi index 47da36e..e5fdda7 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.8.11 -#### Date: June 26 2012 +#### version: 1.8.12 +#### Date: July 1 2012 #### Patch Number: 00 ######################################################################## #### SPECIAL THANKS @@ -7065,10 +7065,19 @@ print_hard_disk_data() # printing line one, then new lines according to $divisor setting, and after, if leftovers, print that line. case $i in 0) - hdd_data=$( create_print_line "$Line_Starter" "${C1}HDD Total Size:${C2} ${hdd_capacity} (${hdd_used}) ${hdd_model}" ) - print_screen_output "$hdd_data" - hdd_model='' - Line_Starter=' ' + if [[ $divisor -eq 1 ]];then + hdd_data=$( create_print_line "$Line_Starter" "${C1}HDD Total Size:${C2} ${hdd_capacity} (${hdd_used})" ) + print_screen_output "$hdd_data" + Line_Starter=' ' + hdd_data=$( create_print_line "$Line_Starter" "${hdd_model}" ) + print_screen_output "$hdd_data" + hdd_model='' + else + hdd_data=$( create_print_line "$Line_Starter" "${C1}HDD Total Size:${C2} ${hdd_capacity} (${hdd_used}) ${hdd_model}" ) + print_screen_output "$hdd_data" + hdd_model='' + Line_Starter=' ' + fi ;; *) # using modulus here, if divisible by $divisor, print line, otherwise skip