tweaked A output a bit to make it cleaner on shorter lines

This commit is contained in:
inxi-svn 2012-10-19 18:51:02 +00:00
parent 6a4a15e6ee
commit 2ab831b0db

23
inxi
View file

@ -3,7 +3,7 @@
#### Script Name: inxi #### Script Name: inxi
#### version: 1.8.19 #### version: 1.8.19
#### Date: October 19 2012 #### Date: October 19 2012
#### Patch Number: 06 #### Patch Number: 07
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
######################################################################## ########################################################################
@ -6898,20 +6898,27 @@ print_audio_data()
# only print alsa on last line if short enough, otherwise print on its own line # only print alsa on last line if short enough, otherwise print on its own line
if [[ $i -eq 0 ]];then if [[ $i -eq 0 ]];then
if [[ -n $alsa_data && $( calculate_line_length "$card_string${audio_data}$alsa_data" ) -lt $LINE_MAX ]];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='' alsa_data=''
fi fi
fi fi
if [[ -n $audio_data ]];then 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_data=$( create_print_line "$line_starter" "$card_string$audio_data" )
print_screen_output "$print_data" print_screen_output "$print_data"
# print the line
else else
print_data=$( create_print_line "$line_starter" "$card_string" ) # keep the driver on the same line no matter what, looks weird alone on its own line
print_screen_output "$print_data" if [[ $B_EXTRA_DATA != 'true' ]];then
line_starter=' ' print_data=$( create_print_line "$line_starter" "$card_string$audio_data" )
print_data=$( create_print_line "$line_starter" "$audio_data" ) print_screen_output "$print_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 fi
line_starter=' ' line_starter=' '
fi fi