changed toolkit to show only with -xS, that's not that important.

This commit is contained in:
inxi-svn 2011-05-20 05:24:57 +00:00
parent bb43c32dbc
commit 32096b167f

52
inxi
View file

@ -1692,7 +1692,7 @@ show_options()
print_screen_output " 4 - Also show partition size/filled data for (if present):/, /home, /var/, /boot" print_screen_output " 4 - Also show partition size/filled data for (if present):/, /home, /var/, /boot"
print_screen_output " 5 - For multicore systems, also shows: per core clock speeds; audio card; full disk data." print_screen_output " 5 - For multicore systems, also shows: per core clock speeds; audio card; full disk data."
print_screen_output "-x Show extra data: bogomips on Cpu; driver version (if available) for Network/Audio;" print_screen_output "-x Show extra data: bogomips on Cpu; driver version (if available) for Network/Audio;"
print_screen_output " for network, audio cards, shows PCI Bus ID number also;" print_screen_output " for network, audio cards, shows PCI Bus ID number also; for System, shows Desktop toolkit if avaliable"
print_screen_output " direct rendering status for Graphics (in X). Only works with verbose or line output;" print_screen_output " direct rendering status for Graphics (in X). Only works with verbose or line output;"
print_screen_output " shows (for single gpu, nvidia driver) screen number gpu is running on." print_screen_output " shows (for single gpu, nvidia driver) screen number gpu is running on."
print_screen_output " Shows hdd temp with disk data if you have hddtemp installed, if you are root OR if you have" print_screen_output " Shows hdd temp with disk data if you have hddtemp installed, if you are root OR if you have"
@ -2546,7 +2546,7 @@ detect_desktop_environment()
eval $LOGFS eval $LOGFS
# set the default, this function only runs in X, if null, don't print data out # set the default, this function only runs in X, if null, don't print data out
local desktop_environment='N/A' xprop_root='' ps_aux='' local desktop_environment='' xprop_root='' ps_aux=''
local version='' version_data='' toolkit='' local version='' version_data='' toolkit=''
# note, GNOME_DESKTOP_SESSION_ID is deprecated so we'll see how that works out # note, GNOME_DESKTOP_SESSION_ID is deprecated so we'll see how that works out
@ -2556,13 +2556,15 @@ detect_desktop_environment()
if [[ -n $version ]];then if [[ -n $version ]];then
version=" $version" version=" $version"
fi fi
# this is a hack, and has to be changed with every toolkit version change if [[ $B_EXTRA_DATA == 'true' ]];then
toolkit=$( pkg-config --modversion gtk+-3.0 2>/dev/null ) # this is a hack, and has to be changed with every toolkit version change
if [[ -z $toolkit ]];then toolkit=$( pkg-config --modversion gtk+-3.0 2>/dev/null )
toolkit=$( pkg-config --modversion gtk+-2.0 2>/dev/null ) if [[ -z $toolkit ]];then
fi toolkit=$( pkg-config --modversion gtk+-2.0 2>/dev/null )
if [[ -n $toolkit ]];then fi
version="$version (Gtk: $toolkit)" if [[ -n $toolkit ]];then
version="$version (Gtk: $toolkit)"
fi
fi fi
desktop_environment="Gnome${version}" desktop_environment="Gnome${version}"
# assume 5 will id the same, why not, no need to update in future # assume 5 will id the same, why not, no need to update in future
@ -2572,9 +2574,11 @@ detect_desktop_environment()
if [[ -z $version ]];then if [[ -z $version ]];then
version='5' version='5'
fi fi
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' ) if [[ $B_EXTRA_DATA == 'true' ]];then
if [[ -n $toolkit ]];then toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
version="$version (Qt $toolkit)" if [[ -n $toolkit ]];then
version="$version (Qt $toolkit)"
fi
fi fi
desktop_environment="KDE $version" desktop_environment="KDE $version"
elif [[ $KDE_SESSION_VERSION == '4' ]]; then elif [[ $KDE_SESSION_VERSION == '4' ]]; then
@ -2583,9 +2587,11 @@ detect_desktop_environment()
if [[ -z $version ]];then if [[ -z $version ]];then
version='4' version='4'
fi fi
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' ) if [[ $B_EXTRA_DATA == 'true' ]];then
if [[ -n $toolkit ]];then toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
version="$version (Qt $toolkit)" if [[ -n $toolkit ]];then
version="$version (Qt $toolkit)"
fi
fi fi
desktop_environment="KDE $version" desktop_environment="KDE $version"
# KDE_FULL_SESSION property is only available since KDE 3.5.5. # KDE_FULL_SESSION property is only available since KDE 3.5.5.
@ -2596,9 +2602,11 @@ detect_desktop_environment()
if [[ -z $version ]];then if [[ -z $version ]];then
version='3.5' version='3.5'
fi fi
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' ) if [[ $B_EXTRA_DATA == 'true' ]];then
if [[ -n $toolkit ]];then toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
version="$version (Qt $toolkit)" if [[ -n $toolkit ]];then
version="$version (Qt $toolkit)"
fi
fi fi
desktop_environment="KDE $version" desktop_environment="KDE $version"
# note: fluxbox has a positive PID for blackbox, so I think most desktops can be detected # note: fluxbox has a positive PID for blackbox, so I think most desktops can be detected
@ -2655,7 +2663,7 @@ detect_desktop_environment()
fi fi
fi fi
# a few manual hacks for things that don't id with xprop, these are just good guesses # a few manual hacks for things that don't id with xprop, these are just good guesses
if [[ $desktop_environment == 'N/A' ]];then if [[ -z $desktop_environment ]];then
if [[ -n $( grep -is 'fvwm-crystal' <<< "$ps_aux" | grep -v 'grep' ) ]];then if [[ -n $( grep -is 'fvwm-crystal' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version=$( fvwm --version 2>/dev/null | grep -Esi 'fvwm [[:digit:]]' | gawk '{print $2}' ) version=$( fvwm --version 2>/dev/null | grep -Esi 'fvwm [[:digit:]]' | gawk '{print $2}' )
if [[ -n $version ]];then if [[ -n $version ]];then
@ -6111,7 +6119,11 @@ print_system_data()
# I think these will work, maybe, if logged in as root and in X # I think these will work, maybe, if logged in as root and in X
if [[ $B_RUNNING_IN_X == 'true' ]];then if [[ $B_RUNNING_IN_X == 'true' ]];then
desktop_environment="${C1}Desktop${C2} $( detect_desktop_environment ) " desktop_environment=$( detect_desktop_environment )
if [[ -z $desktop_environment ]];then
desktop_environment='N/A'
fi
desktop_environment="${C1}Desktop${C2} $desktop_environment "
fi fi
# check for 64 bit first # check for 64 bit first