added kde version, and qt version, output

This commit is contained in:
inxi-svn 2011-05-19 05:03:14 +00:00
parent acd5f1d278
commit 095313fa26

35
inxi
View file

@ -2546,7 +2546,8 @@ detect_desktop_environment()
eval $LOGFS
# 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='N/A' xprop_root='' ps_aux=''
local version='' version_data='' toolkit=''
# note, GNOME_DESKTOP_SESSION_ID is deprecated so we'll see how that works out
# https://bugzilla.gnome.org/show_bug.cgi?id=542880
@ -2555,12 +2556,40 @@ detect_desktop_environment()
# assume 5 will id the same, why not, no need to update in future
elif [[ $KDE_SESSION_VERSION == '5' ]]; then
desktop_environment='KDE 5'
version_data=$( kded5 --version 2>/dev/null )
version=$( grep -si '^KDE Development Platform:' <<< "$version_data" | gawk '{print $4}' )
if [[ -z $version ]];then
version='5'
fi
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
if [[ -n $toolkit ]];then
version="$version (Qt: $toolkit)"
fi
desktop_environment="KDE $version"
elif [[ $KDE_SESSION_VERSION == '4' ]]; then
desktop_environment='KDE 4'
version_data=$( kded4 --version 2>/dev/null )
version=$( grep -si '^KDE Development Platform:' <<< "$version_data" | gawk '{print $4}' )
if [[ -z $version ]];then
version='4'
fi
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
if [[ -n $toolkit ]];then
version="$version (Qt: $toolkit)"
fi
desktop_environment="KDE $version"
# KDE_FULL_SESSION property is only available since KDE 3.5.5.
# src: http://humanreadable.nfshost.com/files/startkde
elif [[ $KDE_FULL_SESSION == 'true' ]]; then
desktop_environment='KDE 3.5'
version_data=$( kded --version 2>/dev/null )
version=$( grep -si '^KDE:' <<< "$version_data" | gawk '{print $2}' )
if [[ -z $version ]];then
version='3.5'
fi
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
if [[ -n $toolkit ]];then
version="$version (Qt: $toolkit)"
fi
desktop_environment="KDE $version"
# note: fluxbox has a positive PID for blackbox, so I think most desktops can be detected
# with some work.
elif [[ -n $( type -p xprop ) ]];then