mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 08:35:25 +00:00
fixed bugs
This commit is contained in:
parent
ec8fddfb0a
commit
b6984a89c1
42
inxi
42
inxi
|
@ -2562,7 +2562,7 @@ detect_desktop_environment()
|
||||||
version="$version (Gtk: $toolkit)"
|
version="$version (Gtk: $toolkit)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
desktop_environment="Gnome${version}"
|
desktop_environment="Gnome"
|
||||||
# assume 5 will id the same, why not, no need to update in future
|
# assume 5 will id the same, why not, no need to update in future
|
||||||
elif [[ $KDE_SESSION_VERSION == '5' ]]; then
|
elif [[ $KDE_SESSION_VERSION == '5' ]]; then
|
||||||
version_data=$( kded5 --version 2>/dev/null )
|
version_data=$( kded5 --version 2>/dev/null )
|
||||||
|
@ -2576,7 +2576,7 @@ detect_desktop_environment()
|
||||||
version="$version (Qt $toolkit)"
|
version="$version (Qt $toolkit)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
desktop_environment="KDE $version"
|
desktop_environment="KDE"
|
||||||
elif [[ $KDE_SESSION_VERSION == '4' ]]; then
|
elif [[ $KDE_SESSION_VERSION == '4' ]]; then
|
||||||
version_data=$( kded4 --version 2>/dev/null )
|
version_data=$( kded4 --version 2>/dev/null )
|
||||||
version=$( grep -si '^KDE Development Platform:' <<< "$version_data" | gawk '{print $4}' )
|
version=$( grep -si '^KDE Development Platform:' <<< "$version_data" | gawk '{print $4}' )
|
||||||
|
@ -2589,7 +2589,7 @@ detect_desktop_environment()
|
||||||
version="$version (Qt $toolkit)"
|
version="$version (Qt $toolkit)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
desktop_environment="KDE $version"
|
desktop_environment="KDE"
|
||||||
# KDE_FULL_SESSION property is only available since KDE 3.5.5.
|
# KDE_FULL_SESSION property is only available since KDE 3.5.5.
|
||||||
# src: http://humanreadable.nfshost.com/files/startkde
|
# src: http://humanreadable.nfshost.com/files/startkde
|
||||||
elif [[ $KDE_FULL_SESSION == 'true' ]]; then
|
elif [[ $KDE_FULL_SESSION == 'true' ]]; then
|
||||||
|
@ -2605,7 +2605,7 @@ detect_desktop_environment()
|
||||||
version="$version (Qt $toolkit)"
|
version="$version (Qt $toolkit)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
desktop_environment="KDE $version"
|
desktop_environment="KDE"
|
||||||
# now that the primary ones have been handled, next is to find the ones with unique
|
# now that the primary ones have been handled, next is to find the ones with unique
|
||||||
# xprop detections possible
|
# xprop detections possible
|
||||||
else
|
else
|
||||||
|
@ -2616,20 +2616,20 @@ detect_desktop_environment()
|
||||||
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'
|
||||||
fi
|
fi
|
||||||
desktop_environment="Xfce${version}"
|
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'
|
||||||
fi
|
fi
|
||||||
desktop_environment="Xfce${version}"
|
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${version}"
|
desktop_environment='Fluxbox'
|
||||||
else
|
else
|
||||||
desktop_environment='Blackbox'
|
desktop_environment='Blackbox'
|
||||||
fi
|
fi
|
||||||
|
@ -2639,33 +2639,36 @@ detect_desktop_environment()
|
||||||
if [[ -n $version ]];then
|
if [[ -n $version ]];then
|
||||||
version=" (Openbox$version)"
|
version=" (Openbox$version)"
|
||||||
fi
|
fi
|
||||||
desktop_environment="LXDE${version}"
|
desktop_environment='LXDE'
|
||||||
else
|
else
|
||||||
desktop_environment="Openbox${version}"
|
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${version}"
|
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${version}"
|
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${version}"
|
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${version}"
|
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${version}"
|
desktop_environment='Awesome'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo $desktop_environment
|
if [[ -n $version ]];then
|
||||||
|
version=" $version"
|
||||||
|
fi
|
||||||
|
echo "$desktop_environment${version}"
|
||||||
eval $LOGFE
|
eval $LOGFE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2682,11 +2685,8 @@ get_de_version()
|
||||||
gsub(",","",$0)
|
gsub(",","",$0)
|
||||||
print $'$3'
|
print $'$3'
|
||||||
}' )
|
}' )
|
||||||
if [[ -n $version ]];then
|
|
||||||
version=" $version"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$version"
|
echo $version
|
||||||
}
|
}
|
||||||
# for more on distro id, please reference this python thread: http://bugs.python.org/issue1322
|
# for more on distro id, please reference this python thread: http://bugs.python.org/issue1322
|
||||||
## return distro name/id if found
|
## return distro name/id if found
|
||||||
|
|
Loading…
Reference in a new issue