added xfce built with toolkit

This commit is contained in:
inxi-svn 2011-05-21 22:54:02 +00:00
parent 5f2bb1a94e
commit 1ba97c1ea7

37
inxi
View file

@ -2551,7 +2551,7 @@ detect_desktop_environment()
# 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
# https://bugzilla.gnome.org/show_bug.cgi?id=542880 # https://bugzilla.gnome.org/show_bug.cgi?id=542880
if [[ -n $GNOME_DESKTOP_SESSION_ID ]]; then if [[ -n $GNOME_DESKTOP_SESSION_ID ]]; then
version="$( get_de_version 'gnome-about' 'gnome' '3' )" version=$( get_de_version 'gnome-about' 'gnome' '3' )
if [[ $B_EXTRA_DATA == 'true' ]];then if [[ $B_EXTRA_DATA == 'true' ]];then
# this is a hack, and has to be changed with every toolkit version change # this is a hack, and has to be changed with every toolkit version change
toolkit=$( pkg-config --modversion gtk+-3.0 2>/dev/null ) toolkit=$( pkg-config --modversion gtk+-3.0 2>/dev/null )
@ -2595,7 +2595,7 @@ detect_desktop_environment()
elif [[ $KDE_FULL_SESSION == 'true' ]]; then elif [[ $KDE_FULL_SESSION == 'true' ]]; then
version_data=$( kded --version 2>/dev/null ) version_data=$( kded --version 2>/dev/null )
version=$( grep -si '^KDE:' <<< "$version_data" | gawk '{print $2}' ) version=$( grep -si '^KDE:' <<< "$version_data" | gawk '{print $2}' )
# version="$( get_de_version 'kded' '^KDE:' '2' )" # version=$( get_de_version 'kded' '^KDE:' '2' )
if [[ -z $version ]];then if [[ -z $version ]];then
version='3.5' version='3.5'
fi fi
@ -2614,27 +2614,41 @@ detect_desktop_environment()
xprop_root="$( xprop -root 2>/dev/null )" xprop_root="$( xprop -root 2>/dev/null )"
# String: "This is xfdesktop version 4.2.12" # String: "This is xfdesktop version 4.2.12"
if [[ -n $( grep -Eis '\"xfce4\"' <<< "$xprop_root" ) ]];then if [[ -n $( grep -Eis '\"xfce4\"' <<< "$xprop_root" ) ]];then
version="$( get_de_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )" version=$( get_de_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )
if [[ -z $version ]];then if [[ -z $version ]];then
version='4' version='4'
else
if [[ $B_EXTRA_DATA == 'true' ]];then
toolkit=$( get_de_version 'xfdesktop' 'Built[[:space:]]with[[:space:]]GTK' '4' )
if [[ -n $toolkit ]];then
version="$version (GTK+ $toolkit)"
fi
fi
fi fi
desktop_environment="Xfce" desktop_environment="Xfce"
# when 5 is released, the string may need updating # when 5 is released, the string may need updating
elif [[ -n $( grep -is '\"xfce5\"' <<< "$xprop_root" ) ]];then elif [[ -n $( grep -is '\"xfce5\"' <<< "$xprop_root" ) ]];then
version="$( get_de_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )" version=$( get_de_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )
if [[ -z $version ]];then if [[ -z $version ]];then
version='5' version='5'
else
if [[ $B_EXTRA_DATA == 'true' ]];then
toolkit=$( get_de_version 'xfdesktop' 'Built[[:space:]]with[[:space:]]GTK' '4' )
if [[ -n $toolkit ]];then
version="$version (GTK+ $toolkit)"
fi
fi
fi fi
desktop_environment="Xfce" desktop_environment="Xfce"
elif [[ -n $( grep -is 'BLACKBOX_PID' <<< "$xprop_root" ) ]];then elif [[ -n $( grep -is 'BLACKBOX_PID' <<< "$xprop_root" ) ]];then
if [[ -n $( grep -is 'fluxbox' <<< "$ps_aux" | grep -v 'grep' ) ]];then if [[ -n $( grep -is 'fluxbox' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version="$( get_de_version 'fluxbox' 'fluxbox[[:space:]]([[:digit:]]|GIT)' '2' )" version=$( get_de_version 'fluxbox' 'fluxbox[[:space:]]([[:digit:]]|GIT)' '2' )
desktop_environment='Fluxbox' desktop_environment='Fluxbox'
else else
desktop_environment='Blackbox' desktop_environment='Blackbox'
fi fi
elif [[ -n $( grep -is 'OPENBOX_PID' <<< "$xprop_root" ) ]];then elif [[ -n $( grep -is 'OPENBOX_PID' <<< "$xprop_root" ) ]];then
version="$( get_de_version 'openbox' 'openbox[[:space:]]([[:digit:]]|GIT)' '2' )" version=$( get_de_version 'openbox' 'openbox[[:space:]]([[:digit:]]|GIT)' '2' )
if [[ -n $( grep -is 'lxde' <<< "$ps_aux" | grep -v 'grep' ) ]];then if [[ -n $( grep -is 'lxde' <<< "$ps_aux" | grep -v 'grep' ) ]];then
if [[ -n $version ]];then if [[ -n $version ]];then
version=" (Openbox$version)" version=" (Openbox$version)"
@ -2644,23 +2658,23 @@ detect_desktop_environment()
desktop_environment='Openbox' desktop_environment='Openbox'
fi fi
elif [[ -n $( grep -is 'ICEWM' <<< "$xprop_root" ) ]];then elif [[ -n $( grep -is 'ICEWM' <<< "$xprop_root" ) ]];then
version="$( get_de_version 'icewm' 'icewm[[:space:]]([[:digit:]]|GIT)' '2' )" version=$( get_de_version 'icewm' 'icewm[[:space:]]([[:digit:]]|GIT)' '2' )
desktop_environment='IceWM' desktop_environment='IceWM'
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 [[ -z $desktop_environment ]];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="$( get_de_version 'fvwm' 'fvwm[[:space:]]([[:digit:]]|GIT)' '2' )" version=$( get_de_version 'fvwm' 'fvwm[[:space:]]([[:digit:]]|GIT)' '2' )
desktop_environment='FVWM-Crystal' desktop_environment='FVWM-Crystal'
elif [[ -n $( grep -is 'fvwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then elif [[ -n $( grep -is 'fvwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version="$( get_de_version 'fvwm' 'fvwm[[:space:]]([[:digit:]]|GIT)' '2' )" version=$( get_de_version 'fvwm' 'fvwm[[:space:]]([[:digit:]]|GIT)' '2' )
desktop_environment='FVWM' desktop_environment='FVWM'
elif [[ -n $( grep -is 'pekwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then elif [[ -n $( grep -is 'pekwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version="$( get_de_version 'pekwm' 'pekwm.*([[:digit:]]|GIT)' '3' )" version=$( get_de_version 'pekwm' 'pekwm.*([[:digit:]]|GIT)' '3' )
desktop_environment='pekwm' desktop_environment='pekwm'
elif [[ -n $( grep -is 'awesome' <<< "$ps_aux" | grep -v 'grep' ) ]];then elif [[ -n $( grep -is 'awesome' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version="$( get_de_version 'awesome' 'awesome' '2' )" version=$( get_de_version 'awesome' 'awesome' '2' )
desktop_environment='Awesome' desktop_environment='Awesome'
fi fi
fi fi
@ -2672,6 +2686,7 @@ detect_desktop_environment()
eval $LOGFE eval $LOGFE
} }
# note: gawk doesn't support white spaces in search string, gave errors, so use [[:space:]] instead
# args: $1 - desktop command for --version; $2 - search string; $3 - gawk print number # args: $1 - desktop command for --version; $2 - search string; $3 - gawk print number
get_de_version() get_de_version()
{ {