mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
got gnome version/gtk version
This commit is contained in:
parent
095313fa26
commit
962f1b9665
17
inxi
17
inxi
|
@ -2552,7 +2552,16 @@ detect_desktop_environment()
|
|||
# note, GNOME_DESKTOP_SESSION_ID is deprecated so we'll see how that works out
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=542880
|
||||
if [[ ! -z $GNOME_DESKTOP_SESSION_ID ]]; then
|
||||
desktop_environment='GNOME'
|
||||
version=$( gnome-about --version 2>/dev/null | gawk '{print $3}' )
|
||||
if [[ -n $version ]];then
|
||||
version=" $version"
|
||||
fi
|
||||
# this is a hack, and has to be changed with every toolkit version change
|
||||
toolkit=$( pkg-config --modversion gtk+-2.0 2>/dev/null )
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Gtk: $toolkit)"
|
||||
fi
|
||||
desktop_environment="Gnome${version}"
|
||||
# assume 5 will id the same, why not, no need to update in future
|
||||
elif [[ $KDE_SESSION_VERSION == '5' ]]; then
|
||||
desktop_environment='KDE 5'
|
||||
|
@ -2563,7 +2572,7 @@ detect_desktop_environment()
|
|||
fi
|
||||
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Qt: $toolkit)"
|
||||
version="$version (Qt $toolkit)"
|
||||
fi
|
||||
desktop_environment="KDE $version"
|
||||
elif [[ $KDE_SESSION_VERSION == '4' ]]; then
|
||||
|
@ -2574,7 +2583,7 @@ detect_desktop_environment()
|
|||
fi
|
||||
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Qt: $toolkit)"
|
||||
version="$version (Qt $toolkit)"
|
||||
fi
|
||||
desktop_environment="KDE $version"
|
||||
# KDE_FULL_SESSION property is only available since KDE 3.5.5.
|
||||
|
@ -2587,7 +2596,7 @@ detect_desktop_environment()
|
|||
fi
|
||||
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Qt: $toolkit)"
|
||||
version="$version (Qt $toolkit)"
|
||||
fi
|
||||
desktop_environment="KDE $version"
|
||||
# note: fluxbox has a positive PID for blackbox, so I think most desktops can be detected
|
||||
|
|
Loading…
Reference in a new issue