From caa106f85e89497f15232410f2e3907a68d29402 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 24 Sep 2014 06:20:41 +0000 Subject: [PATCH] no version change, new tarball. This is a purely code cosmetic change, XDG_CuRRENT_DESKTOP now shows X-Cinnamon for cinnamon, so added an xdg test to skip the xrop -root section. Since either will catch it fine, there is no actual difference in output or outcome. --- inxi | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/inxi b/inxi index f026a5f..e7e3c69 100755 --- a/inxi +++ b/inxi @@ -4431,7 +4431,7 @@ get_desktop_environment() desktop_environment="KDE" elif [[ $XDG_CURRENT_DESKTOP == 'Unity' ]];then version=$( get_program_version 'unity' '^unity' '2' ) - # not certain cinn will always have version, so keep output right if not + # not certain will always have version, so keep output right if not if [[ -n $version ]];then version="$version " fi @@ -4458,6 +4458,20 @@ get_desktop_environment() fi fi desktop_environment='LXQt' + # note, X-Cinnamon value strikes me as highly likely to change, so just search for the last part + elif [[ -n $XDG_CURRENT_DESKTOP && -z ${XDG_CURRENT_DESKTOP/*innamon*/} ]];then + version=$( get_program_version 'cinnamon' '^cinnamon' '2' ) + # not certain cinn will always have version, so keep output right if not + if [[ -n $version ]];then + version="$version " + fi + if [[ $B_EXTRA_DATA == 'true' ]];then + toolkit=$( get_de_gtk_data ) + if [[ -n $toolkit ]];then + version="$version(Gtk $toolkit)" + fi + fi + desktop_environment="Cinnamon" fi # did we find it? If not, start the xprop tests if [[ -z $desktop_environment ]];then @@ -4792,6 +4806,10 @@ get_de_gtk_data() fi elif type -p pacman &>/dev/null;then toolkit=$( pacman -Qi gtk3 2>/dev/null | gawk -F ':' '/^Version/ {print $2}' ) + # just guessing on gkt 4 package name + if [[ -z $toolkit ]];then + toolkit=$( pacman -Qi gtk4 2>/dev/null | gawk -F ':' '/^Version/ {print $2}' ) + fi if [[ -z $toolkit ]];then toolkit=$( pacman -Qi gtk2 2>/dev/null | gawk -F ':' '/^Version/ {print $2}' ) fi