mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
last cleanups and syntax fixes
This commit is contained in:
parent
e8a2c34658
commit
804ec79ce5
19
inxi
19
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.9.7-b1-t1
|
||||
#### version: 0.9.7-b1-t2
|
||||
#### Date: 26 January 2009
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -1789,6 +1789,7 @@ get_graphics_glx_data()
|
|||
if [[ $B_X_RUNNING == 'true' ]];then
|
||||
IFS=$'\n'
|
||||
A_GLX_DATA=( $( glxinfo | gawk -F ': ' '
|
||||
# note: function declarations go before BEGIN? It appears so, confirm.
|
||||
function join(arr, sep) {
|
||||
s=""
|
||||
i=flag=0
|
||||
|
@ -1801,7 +1802,9 @@ get_graphics_glx_data()
|
|||
return s
|
||||
}
|
||||
|
||||
BEGIN { IGNORECASE=1 }
|
||||
BEGIN {
|
||||
IGNORECASE=1
|
||||
}
|
||||
/opengl renderer/ {
|
||||
if ($2 ~ /mesa/) {
|
||||
# Allow r300 et al, but not the rest
|
||||
|
@ -1839,7 +1842,9 @@ get_graphics_res_data()
|
|||
# Added the two ?'s , because the resolution is now reported without spaces around the 'x', as in
|
||||
# 1400x1050 instead of 1400 x 1050. Change as of X.org version 1.3.0
|
||||
screen_resolution=$( xrandr | gawk '
|
||||
/\*/ { res[++m] = gensub(/^.* ([0-9]+) ?x ?([0-9]+)[_ ].* ([0-9\.]+)\*.*$/,"\\1x\\2@\\3hz","g",$0) }
|
||||
/\*/ {
|
||||
res[++m] = gensub(/^.* ([0-9]+) ?x ?([0-9]+)[_ ].* ([0-9\.]+)\*.*$/,"\\1x\\2@\\3hz","g",$0)
|
||||
}
|
||||
END {
|
||||
for (n in res) {
|
||||
if (res[n] ~ /^[[:digit:]]+x[[:digit:]]+/) {
|
||||
|
@ -1884,7 +1889,9 @@ get_graphics_x_data()
|
|||
if [[ $B_X_RUNNING == 'true' ]];then
|
||||
# X vendor and version detection.
|
||||
x_vendor=$( xdpyinfo | gawk -F': +' '
|
||||
BEGIN { IGNORECASE=1 }
|
||||
BEGIN {
|
||||
IGNORECASE=1
|
||||
}
|
||||
/vendor string/ {
|
||||
gsub(/the|inc|foundation|project|corporation/, "", $2)
|
||||
gsub(/,/, " ", $2)
|
||||
|
@ -1899,7 +1906,9 @@ get_graphics_x_data()
|
|||
x_version=$( xdpyinfo | gawk '/version:/ { print $NF }' )
|
||||
if [[ -z $x_version ]];then
|
||||
x_version=$(xdpyinfo | gawk -F': +' '
|
||||
BEGIN { IGNORECASE=1 }
|
||||
BEGIN {
|
||||
IGNORECASE=1
|
||||
}
|
||||
/vendor release number/ {
|
||||
gsub(/0+$/, "", $2)
|
||||
gsub(/0+/, ".", $2)
|
||||
|
|
Loading…
Reference in a new issue