From 142fd364ec360ef427bd2702e96f68e364486e00 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 21 May 2011 22:32:25 +0000 Subject: [PATCH] bug fix --- inxi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/inxi b/inxi index 9a84456..ff51f18 100755 --- a/inxi +++ b/inxi @@ -2595,6 +2595,7 @@ detect_desktop_environment() elif [[ $KDE_FULL_SESSION == 'true' ]]; then version_data=$( kded --version 2>/dev/null ) version=$( grep -si '^KDE:' <<< "$version_data" | gawk '{print $2}' ) + # version=$( get_de_version 'kded' '^KDE:' '2' ) if [[ -z $version ]];then version='3.5' fi @@ -2613,27 +2614,27 @@ detect_desktop_environment() xprop_root="$( xprop -root 2>/dev/null )" # String: "This is xfdesktop version 4.2.12" if [[ -n $( grep -Eis '\"xfce4\"' <<< "$xprop_root" ) ]];then - version=$( get_de_version 'xfdesktop' 'xfdesktop version' '5' ) + version=$( get_de_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' ) if [[ -z $version ]];then version="4" fi desktop_environment="Xfce${version}" # when 5 is released, the string may need updating elif [[ -n $( grep -is '\"xfce5\"' <<< "$xprop_root" ) ]];then - version=$( get_de_version 'xfdesktop' 'xfdesktop version' '5' ) + version=$( get_de_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' ) if [[ -z $version ]];then version="5" fi desktop_environment="Xfce${version}" elif [[ -n $( grep -is 'BLACKBOX_PID' <<< "$xprop_root" ) ]];then if [[ -n $( grep -is 'fluxbox' <<< "$ps_aux" | grep -v 'grep' ) ]];then - version=$( get_de_version 'fluxbox' 'fluxbox ([[:digit:]]|GIT)' '2' ) + version=$( get_de_version 'fluxbox' 'fluxbox[[:space:]]([[:digit:]]|GIT)' '2' ) desktop_environment="Fluxbox${version}" else desktop_environment='Blackbox' fi elif [[ -n $( grep -is 'OPENBOX_PID' <<< "$xprop_root" ) ]];then - version=$( get_de_version 'openbox' 'openbox ([[: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 $version ]];then version=" (Openbox$version)" @@ -2643,17 +2644,17 @@ detect_desktop_environment() desktop_environment="Openbox${version}" fi elif [[ -n $( grep -is 'ICEWM' <<< "$xprop_root" ) ]];then - version=$( get_de_version 'icewm' 'icewm ([[:digit:]]|GIT)' '2' ) + version=$( get_de_version 'icewm' 'icewm[[:space:]]([[:digit:]]|GIT)' '2' ) desktop_environment="IceWM${version}" fi fi # a few manual hacks for things that don't id with xprop, these are just good guesses if [[ -z $desktop_environment ]];then if [[ -n $( grep -is 'fvwm-crystal' <<< "$ps_aux" | grep -v 'grep' ) ]];then - version=$( get_de_version 'fvwm' 'fvwm ([[:digit:]]|GIT)' '2' ) + version=$( get_de_version 'fvwm' 'fvwm[[:space:]]([[:digit:]]|GIT)' '2' ) desktop_environment="FVWM-Crystal${version}" elif [[ -n $( grep -is 'fvwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then - version=$( get_de_version 'fvwm' 'fvwm ([[:digit:]]|GIT)' '2' ) + version=$( get_de_version 'fvwm' 'fvwm[[:space:]]([[:digit:]]|GIT)' '2' ) desktop_environment="FVWM${version}" elif [[ -n $( grep -is 'pekwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then version=$( get_de_version 'pekwm' 'pekwm.*([[:digit:]]|GIT)' '3' )