From 559b049add629cab5d332c5b739570e08101d4f6 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 19 May 2011 06:20:20 +0000 Subject: [PATCH] xfce version numbers added --- inxi | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index 3b1e6de..84f796a 100755 --- a/inxi +++ b/inxi @@ -2604,10 +2604,22 @@ detect_desktop_environment() elif [[ -n $( type -p xprop ) ]];then xprop_root="$( xprop -root 2>/dev/null )" ps_aux="$( ps aux )" - if [[ -n $( grep -is '\"xfce4\"' <<< "$xprop_root" ) ]];then - desktop_environment='Xfce4' + if [[ -n $( grep -Eis '\"xfce4\"' <<< "$xprop_root" ) ]];then + version=$( xfdesktop --version 2>/dev/null | grep -Eosi 'xfdesktop version [0-9\.]+' | gawk '{print $3}' ) + if [[ -n $version ]];then + version=" $version" + else + version="4" + fi + desktop_environment="Xfce${version}" elif [[ -n $( grep -is '\"xfce5\"' <<< "$xprop_root" ) ]];then - desktop_environment='Xfce5' + version=$( xfdesktop --version 2>/dev/null | grep -Eosi 'xfdesktop version [0-9\.]+' | gawk '{print $3}' ) + if [[ -n $version ]];then + version=" $version" + else + 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=$( fluxbox --version 2>/dev/null | grep -Esi 'fluxbox [[:digit:]]' | gawk '{print $2}' )