mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
Fixed output bugs for xchat, got rid of unnecessary and hard to read printf
This commit is contained in:
parent
1a23eb245e
commit
722014366a
22
inxi
22
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.1.39
|
||||
#### version: 0.1.40
|
||||
#### Date: October 29 2008
|
||||
########################################################################
|
||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
||||
|
@ -1161,9 +1161,9 @@ print_cpu_data()
|
|||
cpu_data=$( create_print_line "CPU:" "${cpu_number}${a_cpu_working[0]}" )
|
||||
if [ "$VERBOSITY_LEVEL" -ge 3 ]
|
||||
then
|
||||
cpu_data=$( printf "%s${C2} %s %s ${C1}%s${CN}%s${C2} %s ${CN}%s" "$cpu_data" "${a_cpu_working[2]}" "cache" "flags" "(" "$CPUFLAGS" ")" )
|
||||
cpu_data="$cpu_data${C2} ${a_cpu_working[2]} cache${C2} ${C1}flags${C2} ($CPUFLAGS)${CN}"
|
||||
fi
|
||||
cpu_data=$( printf "%s ${C1}%s${C2} ${CN}%s" "$cpu_data" "clocked at" "${a_cpu_working[1]} MHz" )
|
||||
cpu_data="$cpu_data ${C1}clocked at${C2} ${a_cpu_working[1]} MHz${CN}"
|
||||
print_screen_output "$cpu_data"
|
||||
|
||||
for (( i=1; i < ${#A_CPU_DATA[@]}-1; i++ ))
|
||||
|
@ -1174,9 +1174,9 @@ print_cpu_data()
|
|||
cpu_data=$( create_print_line " " "${C1}($(( i + 1 )))${C2} ${a_cpu_working[0]}" )
|
||||
if [ "$VERBOSITY_LEVEL" -ge 3 ]
|
||||
then
|
||||
cpu_data=$( printf "%s${C2} %s %s ${C1}%s${CN}%s${C2} %s ${CN}%s" "$cpu_data" "${a_cpu_working[2]}" "cache" "flags" "(" "$CPUFLAGS" ")" )
|
||||
cpu_data="$cpu_data${C2} ${a_cpu_working[2]} cache${C2} ${C1}flags${C2} ($CPUFLAGS)${CN}"
|
||||
fi
|
||||
cpu_data=$( printf "%s ${C1}%s${C2} ${CN}%s" "$cpu_data" "clocked at" "${a_cpu_working[1]} MHz" )
|
||||
cpu_data="$cpu_data ${C1}clocked at${C2} ${a_cpu_working[1]} MHz${CN}"
|
||||
print_screen_output "$cpu_data"
|
||||
if [ "$i" -gt 10 ]
|
||||
then
|
||||
|
@ -1194,7 +1194,7 @@ print_gfx_data()
|
|||
i=1
|
||||
while [[ -n ${GFX[i]} && $i -le 3 ]]
|
||||
do
|
||||
gfx_data=$( echo -ne " ${C1}Card-$(($i+1))${C2} ${GFX[i]} " )
|
||||
gfx_data=" ${C1}Card-$(($i+1))${C2} ${GFX[i]} "
|
||||
(( i++ ))
|
||||
done
|
||||
card_one='Card-1'
|
||||
|
@ -1202,9 +1202,9 @@ print_gfx_data()
|
|||
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}$( echo -ne "${C1} $XVER ${CN}[${C2} ${RES} ${CN}]" )"
|
||||
gfx_data="${gfx_data} ${C1} $XVER ${CN}[${C2} ${RES} ${CN}]"
|
||||
else
|
||||
gfx_data="${gfx_data}$( echo -ne "${C1} tty resolution ${CN}(${C2} ${RES} ${CN})" )"
|
||||
gfx_data="${gfx_data} ${C1} tty resolution ${CN}(${C2} ${RES} ${CN})"
|
||||
fi
|
||||
print_screen_output "$gfx_data"
|
||||
|
||||
|
@ -1213,7 +1213,7 @@ print_gfx_data()
|
|||
gfx_data=$( create_print_line " " "${C1}GLX Renderer${C2} ${GLXR}${CN} | ${C1}GLX Version${C2} ${GLXV}${CN}" )
|
||||
if ((CRAP))
|
||||
then
|
||||
gfx_data="${gfx_data}$( echo -ne "${C1}Direct rendering${C2} ${GLXDR}${CN}" )"
|
||||
gfx_data="${gfx_data} ${C1}Direct rendering${C2} ${GLXDR}${CN}"
|
||||
fi
|
||||
print_screen_output "$gfx_data"
|
||||
fi
|
||||
|
@ -1235,7 +1235,7 @@ print_hard_disk_data()
|
|||
|
||||
if [ "$VERBOSITY_LEVEL" -ge 4 ]
|
||||
then
|
||||
hdd_data=$( printf "${C1}%-${INDENT}s${C2} %s" " " "${root_home_data}" )
|
||||
hdd_data=$( create_print_line " " "${root_home_data}" )
|
||||
print_screen_output "$hdd_data"
|
||||
fi
|
||||
}
|
||||
|
@ -1250,7 +1250,7 @@ print_intro_data()
|
|||
else
|
||||
intro_data=$( create_print_line "System:" "${C1}running${C2} ${CN}" )
|
||||
fi
|
||||
intro_data="$intro_data$( echo -ne "${C2}$CURRENT_KERNEL ${C1}Distro${C2} $DISTRO ${CN}" )"
|
||||
intro_data="$intro_data ${C2}$CURRENT_KERNEL ${C1}Distro${C2} $DISTRO ${CN}"
|
||||
print_screen_output "$intro_data"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue