mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
(change version)
fixed a subtle spacing issue that sometimes makes some data change irc colors, now all spacing should protect against that.
This commit is contained in:
parent
d58622e6b5
commit
3bb4cf508c
19
inxi
19
inxi
|
@ -2858,7 +2858,7 @@ print_short_data()
|
|||
# print sound card data
|
||||
print_audio_data()
|
||||
{
|
||||
local i='' card_one='Card-1 ' audio_data='' a_audio_data='' port_data=''
|
||||
local i='' card_one='Card-1' audio_data='' a_audio_data='' port_data=''
|
||||
local a_audio_working='' alsa_driver='' alsa_data='' port_plural='' module_version=''
|
||||
# set A_AUDIO_DATA and get alsa data
|
||||
get_audio_data
|
||||
|
@ -2870,7 +2870,7 @@ print_audio_data()
|
|||
if [[ -n ${A_AUDIO_DATA[@]} ]];then
|
||||
# slightly complicated because 2nd array item could be the alsa data
|
||||
if [[ ${#A_AUDIO_DATA[@]} -le 1 ]];then
|
||||
card_one='Card '
|
||||
card_one='Card'
|
||||
fi
|
||||
|
||||
# if [[ -n ${a_audio_working[2]} ]];then
|
||||
|
@ -2889,7 +2889,7 @@ print_audio_data()
|
|||
fi
|
||||
port_data=" ${C1}at port$port_plural${C2} ${a_audio_working[2]}"
|
||||
fi
|
||||
audio_data="${C1}$card_one${C2}${a_audio_working[0]}$alsa_driver$port_data"
|
||||
audio_data="${C1}$card_one${C2} ${a_audio_working[0]}$alsa_driver$port_data"
|
||||
audio_data=$( create_print_line "Audio:" "$audio_data" )
|
||||
print_screen_output "$audio_data"
|
||||
i=0 ## loop starts with 1 by auto-increment so it only shows cards > 1
|
||||
|
@ -2916,7 +2916,7 @@ print_audio_data()
|
|||
port_data=" ${C1}at port$port_plural${C2} ${a_audio_working[2]}"
|
||||
fi
|
||||
if [[ -n ${a_audio_working[0]} ]];then
|
||||
audio_data="${C1}Card-$(( $i + 1 )) ${C2}${a_audio_working[0]}$alsa_driver$port_data"
|
||||
audio_data="${C1}Card-$(( $i + 1 ))${C2} ${a_audio_working[0]}$alsa_driver$port_data"
|
||||
fi
|
||||
if [[ -n $audio_data ]];then
|
||||
audio_data=$( create_print_line " " "$audio_data" )
|
||||
|
@ -2925,7 +2925,7 @@ print_audio_data()
|
|||
done
|
||||
# alsa driver data only prints out if sound card data is found
|
||||
if [[ -n $alsa_data ]];then
|
||||
audio_data="${C1}Sound: ${C2}$alsa_data"
|
||||
audio_data="${C1}Sound:${C2} $alsa_data"
|
||||
audio_data=$( create_print_line " " "$audio_data" )
|
||||
print_screen_output "$audio_data"
|
||||
fi
|
||||
|
@ -3021,6 +3021,7 @@ print_cpu_data()
|
|||
IFS=","
|
||||
a_cpu_working=(${A_CPU_DATA[i]})
|
||||
IFS="$ORIGINAL_IFS"
|
||||
# note: the first iteration will create a first space, for color code separation below
|
||||
cpu_multi_clock_data="$cpu_multi_clock_data ${C1}($(( i + 1 )))${C2} ${a_cpu_working[1]} MHz${CN}"
|
||||
if [[ $i -gt 10 ]];then
|
||||
break
|
||||
|
@ -3068,7 +3069,7 @@ print_cpu_flags_full()
|
|||
|
||||
print_gfx_data()
|
||||
{
|
||||
local gfx_data='' i='' card_one='Card ' root_alert=''
|
||||
local gfx_data='' i='' card_one='Card' root_alert=''
|
||||
local screen_resolution="$( get_graphics_res_data )"
|
||||
local b_is_mesa='false' display_full_string=''
|
||||
# set A_GFX_CARD_DATA
|
||||
|
@ -3110,9 +3111,9 @@ print_gfx_data()
|
|||
gfx_data=" ${C1}Card-$(($i+1))${C2} ${A_GFX_CARD_DATA[i]}"
|
||||
((i++))
|
||||
done
|
||||
card_one='Card-1 '
|
||||
card_one='Card-1'
|
||||
fi
|
||||
gfx_data=$( create_print_line "Graphics:" "${C1}$card_one${C2}${A_GFX_CARD_DATA[0]}${gfx_data} $display_full_string" )
|
||||
gfx_data=$( create_print_line "Graphics:" "${C1}$card_one${C2} ${A_GFX_CARD_DATA[0]}${gfx_data} $display_full_string" )
|
||||
print_screen_output "$gfx_data"
|
||||
|
||||
# if [[ -z $glx_renderer || -z $glx_version ]];then
|
||||
|
@ -3304,7 +3305,7 @@ print_networking_data()
|
|||
fi
|
||||
port_data=" ${C1}at port$port_plural${C2} ${a_network_working[2]}"
|
||||
fi
|
||||
network_data="${C1}Card-$(( $i + 1 )) ${C2}${a_network_working[0]}$driver_data$port_data"
|
||||
network_data="${C1}Card-$(( $i + 1 ))${C2} ${a_network_working[0]}$driver_data$port_data"
|
||||
network_data=$( create_print_line " " "$network_data" )
|
||||
print_screen_output "$network_data"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue