mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
More fine tuning, got rid of last bits of printf mess, tweaked syntax slightly
This commit is contained in:
parent
552b063dd2
commit
244307e5e3
20
inxi
20
inxi
|
@ -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
|
||||
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue