From 2ab831b0db038a70bd7cf34d94e406ea72bc20b8 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Fri, 19 Oct 2012 18:51:02 +0000 Subject: [PATCH] tweaked A output a bit to make it cleaner on shorter lines --- inxi | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/inxi b/inxi index 7b3e6aa..fe31434 100755 --- a/inxi +++ b/inxi @@ -3,7 +3,7 @@ #### Script Name: inxi #### version: 1.8.19 #### Date: October 19 2012 -#### Patch Number: 06 +#### Patch Number: 07 ######################################################################## #### SPECIAL THANKS ######################################################################## @@ -6898,20 +6898,27 @@ print_audio_data() # only print alsa on last line if short enough, otherwise print on its own line if [[ $i -eq 0 ]];then if [[ -n $alsa_data && $( calculate_line_length "$card_string${audio_data}$alsa_data" ) -lt $LINE_MAX ]];then - audio_data="$audio_data $alsa_data" + audio_data="$audio_data$alsa_data" alsa_data='' fi fi if [[ -n $audio_data ]];then - if [[ $( calculate_line_length "$card_string${audio_data}$alsa_data" ) -lt $LINE_MAX ]];then + if [[ $( calculate_line_length "$card_string$audio_data" ) -lt $LINE_MAX ]];then print_data=$( create_print_line "$line_starter" "$card_string$audio_data" ) print_screen_output "$print_data" + # print the line else - print_data=$( create_print_line "$line_starter" "$card_string" ) - print_screen_output "$print_data" - line_starter=' ' - print_data=$( create_print_line "$line_starter" "$audio_data" ) - print_screen_output "$print_data" + # keep the driver on the same line no matter what, looks weird alone on its own line + if [[ $B_EXTRA_DATA != 'true' ]];then + print_data=$( create_print_line "$line_starter" "$card_string$audio_data" ) + print_screen_output "$print_data" + else + print_data=$( create_print_line "$line_starter" "$card_string" ) + print_screen_output "$print_data" + line_starter=' ' + print_data=$( create_print_line "$line_starter" "$audio_data" ) + print_screen_output "$print_data" + fi fi line_starter=' ' fi