mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
cleaned up code a bit
This commit is contained in:
parent
476f3cdad3
commit
58fccc20a1
8
inxi
8
inxi
|
@ -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 [[ ! -z $GNOME_DESKTOP_SESSION_ID ]]; then
|
if [[ -n $GNOME_DESKTOP_SESSION_ID ]]; then
|
||||||
version=$( gnome-about --version 2>/dev/null | gawk '{print $3}' )
|
version=$( gnome-about --version 2>/dev/null | gawk '{print $3}' )
|
||||||
if [[ -n $version ]];then
|
if [[ -n $version ]];then
|
||||||
version=" $version"
|
version=" $version"
|
||||||
|
@ -2651,8 +2651,10 @@ detect_desktop_environment()
|
||||||
version=" $version"
|
version=" $version"
|
||||||
fi
|
fi
|
||||||
desktop_environment="IceWM${version}"
|
desktop_environment="IceWM${version}"
|
||||||
# a few manual hacks for things that don't id with xprop, these are just good guesses
|
fi
|
||||||
elif [[ -n $( grep -is 'fvwm-crystal' <<< "$ps_aux" | grep -v 'grep' ) ]];then
|
# a few manual hacks for things that don't id with xprop, these are just good guesses
|
||||||
|
else
|
||||||
|
if [[ -n $( grep -is 'fvwm-crystal' <<< "$ps_aux" | grep -v 'grep' ) ]];then
|
||||||
version=$( fvwm --version 2>/dev/null | grep -Esi 'fvwm [[:digit:]]' | gawk '{print $2}' )
|
version=$( fvwm --version 2>/dev/null | grep -Esi 'fvwm [[:digit:]]' | gawk '{print $2}' )
|
||||||
if [[ -n $version ]];then
|
if [[ -n $version ]];then
|
||||||
version=" $version"
|
version=" $version"
|
||||||
|
|
Loading…
Reference in a new issue