diff --git a/inxi b/inxi index 748d528..ec82481 100755 --- a/inxi +++ b/inxi @@ -1194,18 +1194,19 @@ print_cpu_data() print_gfx_data() { local gfx_data='' i='' card_one='Card ' - - gfx_data=$( create_print_line "Graphics:" "${C1}$card_one${C2}${A_GFX_DATA[0]}" ) + if [[ ${#A_GFX_DATA[@]} -gt 1 ]] then i=1 while [[ -n ${A_GFX_DATA[i]} && $i -le 3 ]] do - gfx_data="${gfx_data} ${C1}Card-$(($i+1))${C2} ${A_GFX_DATA[i]} " + gfx_data=" ${C1}Card-$(($i+1))${C2} ${A_GFX_DATA[i]} " ((i++)) done card_one='Card-1 ' fi + gfx_data=$( create_print_line "Graphics:" "${C1}$card_one${C2}${A_GFX_DATA[0]}${gfx_data} " ) + if [ "$X" -gt 0 ] then gfx_data="${gfx_data} ${CN}| ${C1}$X_VENDOR${C2} $X_VER_NUM ${CN}| ${C1}Res${C2} ${RES}"