From 4bb100ed8e55a40ed9d0be3a755f4a3b87388594 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 19 May 2011 05:52:08 +0000 Subject: [PATCH] more version info for other desktops --- inxi | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/inxi b/inxi index c1ca297..895f97c 100755 --- a/inxi +++ b/inxi @@ -2610,21 +2610,40 @@ detect_desktop_environment() desktop_environment='Xfce5' elif [[ -n $( grep -is 'BLACKBOX_PID' <<< "$xprop_root" ) ]];then if [[ -n $( grep -is 'fluxbox' <<< "$ps_aux" | grep -v 'grep' ) ]];then - desktop_environment='Fluxbox' + version=$( fluxbox --version 2>/dev/null | grep -Esi 'fluxbox [[:digit:]]' | gawk '{print $2}' ) + if [[ -n $version ]];then + version=" $version" + fi + desktop_environment="Fluxbox${version}" else desktop_environment='Blackbox' fi elif [[ -n $( grep -is 'OPENBOX_PID' <<< "$xprop_root" ) ]];then + version=$( openbox --version 2>/dev/null | grep -Esi 'openbox [[:digit:]]' | gawk '{print $2}' ) + if [[ -n $version ]];then + version=" $version" + fi if [[ -n $( grep -is 'lxde' <<< "$ps_aux" | grep -v 'grep' ) ]];then - desktop_environment='LXDE' + if [[ -n $version ]];then + version=" (Openbox $version)" + fi + desktop_environment="LXDE${version}" else - desktop_environment='Openbox' + desktop_environment="Openbox${version}" fi # a few manual hacks for things that don't id with xprop, these are just good guesses elif [[ -n $( grep -is 'fvwm-crystal' <<< "$ps_aux" | grep -v 'grep' ) ]];then - desktop_environment='FVWM-Crystal' + version=$( fvwm --version 2>/dev/null | grep -Esi 'fvwm [[:digit:]]' | gawk '{print $2}' ) + if [[ -n $version ]];then + version=" $version" + fi + desktop_environment="FVWM-Crystal${version}" elif [[ -n $( grep -is 'fvwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then - desktop_environment='FVWM' + version=$( fvwm --version 2>/dev/null | grep -Esi 'fvwm [[:digit:]]' | gawk '{print $2}' ) + if [[ -n $version ]];then + version=" $version" + fi + desktop_environment="FVWM${version}" elif [[ -n $( grep -is 'pekwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then desktop_environment='pekwm' elif [[ -n $( grep -is 'awesome' <<< "$ps_aux" | grep -v 'grep' ) ]];then