mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
(Change Version Number)
To make it more consistent, changed -s to -A, and changed the 'Sound' line starter to Audio This makes all primary line switches upper case, and only -f which is an addon to CPU lower.
This commit is contained in:
parent
c03db070c5
commit
913e9290e0
22
inxi
22
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.5.0
|
||||
#### version: 0.5.1
|
||||
#### Date: November 10 2008
|
||||
########################################################################
|
||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
||||
|
@ -77,6 +77,8 @@ B_SHOW_DISK='false'
|
|||
B_HANDLE_CORRUPT_DATA='false'
|
||||
# Running in a shell? Defaults to false, and is determined later.
|
||||
B_RUNNING_IN_SHELL='false'
|
||||
# Show sound card data
|
||||
B_SHOW_AUDIO='false'
|
||||
B_SHOW_CPU='false'
|
||||
# Show full hard disk output
|
||||
B_SHOW_FULL_HDD='false'
|
||||
|
@ -87,8 +89,6 @@ B_SHOW_INFO='false'
|
|||
B_SHOW_NETWORK='false'
|
||||
# either -v > 3 or -p will show partitions
|
||||
B_SHOW_PARTITIONS='false'
|
||||
# Show sound card data
|
||||
B_SHOW_SOUND='false'
|
||||
# triggers only short inxi output
|
||||
B_SHOW_SHORT_OUTPUT='false'
|
||||
B_SHOW_SYSTEM='false'
|
||||
|
@ -471,9 +471,11 @@ get_parameters()
|
|||
B_SHOW_SHORT_OUTPUT='true'
|
||||
fi
|
||||
|
||||
while getopts c:CdDfFGhHINPsSUv:Vx%@:! opt
|
||||
while getopts Ac:CdDfFGhHINPSUv:Vx%@:! opt
|
||||
do
|
||||
case $opt in
|
||||
A) B_SHOW_AUDIO='true'
|
||||
;;
|
||||
c) if [[ -n $( egrep '^[0-9][0-9]?$' <<< $OPTARG ) ]];then
|
||||
COLOR_SCHEME_SET='true'
|
||||
## note: not sure about this, you'd think user values should be overridden, but
|
||||
|
@ -499,7 +501,7 @@ get_parameters()
|
|||
B_EXTRA_DATA='true'
|
||||
B_SHOW_DISK='true'
|
||||
B_SHOW_PARTITIONS='true'
|
||||
B_SHOW_SOUND='true'
|
||||
B_SHOW_AUDIO='true'
|
||||
;;
|
||||
G) B_SHOW_GRAPHICS='true'
|
||||
;;
|
||||
|
@ -511,8 +513,6 @@ get_parameters()
|
|||
;;
|
||||
P) B_SHOW_PARTITIONS='true'
|
||||
;;
|
||||
s) B_SHOW_SOUND='true'
|
||||
;;
|
||||
S) B_SHOW_SYSTEM='true'
|
||||
;;
|
||||
v) if [[ -n $( egrep "^[0-9][0-9]?$" <<< $OPTARG ) && $OPTARG -le $VERBOSITY_LEVELS ]];then
|
||||
|
@ -562,9 +562,10 @@ show_options()
|
|||
print_screen_output ""
|
||||
print_screen_output "If you start $SCRIPT_NAME with no arguments, it will show the short form."
|
||||
print_screen_output "The following options if used without -d or -v will show just that complete line:"
|
||||
print_screen_output "C,f,D,G,I,N,P,s,S - you can use these together to show just the lines you want to see."
|
||||
print_screen_output "A,C,f,D,G,I,N,P,S - you can use these together to show just the lines you want to see."
|
||||
print_screen_output "If you use them with a -v level, it will show the full output for that line."
|
||||
print_screen_output "- - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
|
||||
print_screen_output "-A Show audio/sound card information."
|
||||
print_screen_output "-c Available color schemes. Scheme number is required."
|
||||
print_screen_output " Supported schemes: 0-$color_scheme_count Example: $SCRIPT_NAME -c 11"
|
||||
print_screen_output "-C Show full CPU output, including per CPU clockspeed."
|
||||
|
@ -576,7 +577,6 @@ show_options()
|
|||
print_screen_output "-I Show information: processes, uptime, memory, irc client, inxi version."
|
||||
print_screen_output "-N Show network card information."
|
||||
print_screen_output "-P Show partition information (shows what -v4 would show, but without extra data)."
|
||||
print_screen_output "-s Show sound card information."
|
||||
print_screen_output "-S Show system information: host name, kernel, distro"
|
||||
print_screen_output "-U Auto-update script. Note: if you installed as root, you"
|
||||
print_screen_output " must be root to update, otherwise user is fine."
|
||||
|
@ -1584,7 +1584,7 @@ print_it_out()
|
|||
if [[ $VERBOSITY_LEVEL -ge 1 || $B_SHOW_GRAPHICS == 'true' ]];then
|
||||
print_gfx_data
|
||||
fi
|
||||
if [[ $B_SHOW_SOUND == 'true' ]];then
|
||||
if [[ $B_SHOW_AUDIO == 'true' ]];then
|
||||
print_audio_data
|
||||
fi
|
||||
if [[ $VERBOSITY_LEVEL -ge 2 || $B_SHOW_NETWORK == 'true' ]];then
|
||||
|
@ -1700,7 +1700,7 @@ print_audio_data()
|
|||
port_data=" ${C1}at port${C2} ${a_audio_working[1]}"
|
||||
fi
|
||||
audio_data="${C1}$card_one${C2}${a_audio_working[0]}$port_data"
|
||||
audio_data=$( create_print_line "Sound:" "$audio_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
|
||||
while [[ -n ${A_AUDIO_DATA[++i]} ]]
|
||||
|
|
Loading…
Reference in a new issue