More fine tuning, got rid of last bits of printf mess, tweaked syntax slightly

This commit is contained in:
inxi-svn 2008-10-30 05:58:18 +00:00
parent 552b063dd2
commit 244307e5e3

22
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 0.1.45
#### version: 0.1.46
#### Date: October 29 2008
########################################################################
#### inxi is a fork of infobash, the original bash sys info script by locsmif
@ -1214,7 +1214,7 @@ print_gfx_data()
if [ "$X" -gt 0 -a "$MESA" -eq 0 ]
then
gfx_data=$( create_print_line " " "${C1}GLX Renderer${C2} ${GLXR}${CN} | ${C1}GLX Version${C2} ${GLXV}${CN}" )
gfx_data=$( create_print_line " " "${C1}GLX Renderer${C2} ${GLXR} ${CN}| ${C1}GLX Version${C2} ${GLXV}${CN}" )
if ((CRAP))
then
gfx_data="${gfx_data} ${C1}Direct rendering${C2} ${GLXDR}${CN}"
@ -1308,16 +1308,16 @@ print_short_data()
#C1="${C1},1"; C2="${C2},1"; CN="${CN},1"
fi
fi
short_data=$( echo -ne "${C1}CPU${CN}[${C2}${CPUMODEL} clocked at ${CPUCLOCK}${CN}] ${C1}Kernel${CN}[${C2}${CURRENT_KERNEL}${CN}] ${C1}Up${CN}[${C2}${FL2}${FL1}${UPT}${FL1}${CN}] ${C1}Mem${CN}[${C2}${FL2}${FL1}${MEM}${FL1}${CN}] ${C1}HDD${CN}[${C2}${FL2}${FL1}${HDD}($HDDUSG)${FL1}${CN}] ${C1}Procs${CN}[${C2}${FL2}${FL1}${PROC}${FL1}${CN}]" )
short_data="${C1}CPU${CN}[${C2}${CPUMODEL} clocked at ${CPUCLOCK}${CN}] ${C1}Kernel${CN}[${C2}${CURRENT_KERNEL}${CN}] ${C1}Up${CN}[${C2}${FL2}${FL1}${UPT}${FL1}${CN}] ${C1}Mem${CN}[${C2}${FL2}${FL1}${MEM}${FL1}${CN}] ${C1}HDD${CN}[${C2}${FL2}${FL1}${HDD}($HDDUSG)${FL1}${CN}] ${C1}Procs${CN}[${C2}${FL2}${FL1}${PROC}${FL1}${CN}]"
if [ "$SHOW_IRC" -gt 0 ]
then
short_data="${short_data}$( echo -ne " ${C1}Client${CN}[${C2}${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}]" )"
short_data="${short_data} ${C1}Client${CN}[${C2}${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}]"
fi
short_data="${short_data} | ${C1}${SCRIPT_VERSION}${CN}"
short_data="${short_data} ${CN}:: ${C1}${SCRIPT_VERSION}${CN}"
if [ "$SCHEME" -gt 0 ]
then
short_data="${short_data}$( echo -ne "$NORMAL" )"
short_data="${short_data} $NORMAL"
fi
print_screen_output "$short_data"
}
@ -1328,22 +1328,22 @@ print_system_data()
# Some code could look superfluous but BitchX doesn't like lines not ending in a newline. F*&k that bitch!
# long_last=$( echo -ne "${C1}Processes${C2} ${PROC}${CN} | ${C1}Uptime${C2} ${UPT}${CN} | ${C1}Memory${C2} ${MEM}${CN}" )
system_data=$( printf "${C1}%-${INDENT}s${C2} %s" "Info:" "${C1}Processes${C2} ${PROC}${CN} | ${C1}Uptime${C2} ${UPT}${CN} | ${C1}Memory${C2} ${MEM}${CN}" )
system_data=$( create_print_line "Info:" "${C1}Processes${C2} ${PROC} ${CN}| ${C1}Uptime${C2} ${UPT} ${CN}| ${C1}Memory${C2} ${MEM}${CN}" )
if [ "$RUNLVL" -gt 0 ]
then
system_data="${system_data}$( echo -ne " | ${C1}Runlevel${C2} ${RUNLVL}${CN}" )"
system_data="${system_data} ${CN}| ${C1}Runlevel${C2} ${RUNLVL}${CN}"
fi
if [ "$SHOW_IRC" -gt 0 ]
then
system_data="${system_data}$( echo -ne " | ${C1}Client${C2} ${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}" )"
system_data="${system_data} ${CN}| ${C1}Client${C2} ${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}"
fi
system_data="${system_data}$( echo -ne " | ${C1}${SCRIPT_VERSION}" )"
system_data="${system_data} ${CN}| ${C1}${SCRIPT_VERSION}"
if [ "$SCHEME" -gt 0 ]
then
system_data="${system_data}$( echo -ne "${NORMAL}" )"
system_data="${system_data} ${NORMAL}"
fi
print_screen_output "$system_data"
}