diff --git a/inxi b/inxi index 4f32364..c7a415d 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.8.15 -#### Date: September 11 2012 +#### version: 1.8.16 +#### Date: September 16 2012 #### Patch Number: 00 ######################################################################## #### SPECIAL THANKS @@ -1480,7 +1480,7 @@ debug_data_collector() cat /etc/mtab &> $debug_data_dir/etc-mtab.txt fi echo 'Creating inxi output file now. This can take a few seconds...' - $SCRIPT_NAME -Fploudxx -c 0 -@ 8 > $debug_data_dir/inxi-Fploudxx.txt + $SCRIPT_NAME -FRploudxxx -c 0 -@ 8 > $debug_data_dir/inxi-FRploudxxx.txt cp $LOG_FILE $SCRIPT_DATA_DIR/$debug_data_dir if [[ -f $debug_data_dir.tar.gz ]];then echo "Found and removing previous tar.gz data file: $debug_data_dir.tar.gz" @@ -3250,16 +3250,31 @@ get_desktop_environment() local desktop_environment='' xprop_root='' ps_aux='' local version='' version_data='' toolkit='' + if [[ -n $( type -p xprop ) ]];then + xprop_root="$( xprop -root 2>/dev/null )" + fi + + # note that cinnamon split from gnome, and and can now be id'ed via xprop, + # but it will still trigger the next gnome true case, so this needs to go before gnome test + if [[ -n $( grep -is '^_MUFFIN' <<< "$xprop_root" ) ]];then + version=$( get_de_app_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" # 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 [[ -n $GNOME_DESKTOP_SESSION_ID ]]; then + elif [[ -n $GNOME_DESKTOP_SESSION_ID ]]; then version=$( get_de_app_version 'gnome-about' 'gnome' '3' ) if [[ $B_EXTRA_DATA == 'true' ]];then - # this is a hack, and has to be changed with every toolkit version change - toolkit=$( pkg-config --modversion gtk+-3.0 2>/dev/null ) - if [[ -z $toolkit ]];then - toolkit=$( pkg-config --modversion gtk+-2.0 2>/dev/null ) - fi + toolkit=$( get_de_gtk_data ) if [[ -n $toolkit ]];then version="$version (Gtk $toolkit)" fi @@ -3312,8 +3327,7 @@ get_desktop_environment() # xprop detections possible else ps_aux="$( ps aux )" - if [[ -n $( type -p xprop ) ]];then - xprop_root="$( xprop -root 2>/dev/null )" + if [[ -n $xprop_root ]];then # String: "This is xfdesktop version 4.2.12" if [[ -n $( grep -Eis '\"xfce4\"' <<< "$xprop_root" ) ]];then version=$( get_de_app_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' ) @@ -3460,7 +3474,7 @@ get_desktop_extra_data() desktops="" separator="" } - /(cinnamon|gnome-shell|gnome-panel|kicker|lxpanel|mate-panel|plasma-desktop|xfce4-panel)$/ { + /(gnome-shell|gnome-panel|kicker|lxpanel|mate-panel|plasma-desktop|xfce4-panel)$/ { # only one entry per type, can be multiple if ( desktops !~ $NF ) { desktops = desktops separator $NF @@ -3476,6 +3490,22 @@ get_desktop_extra_data() eval $LOGFE } +get_de_gtk_data() +{ + eval $LOGFS + + local toolkit='' + + # this is a hack, and has to be changed with every toolkit version change + toolkit=$( pkg-config --modversion gtk+-3.0 2>/dev/null ) + if [[ -z $toolkit ]];then + toolkit=$( pkg-config --modversion gtk+-2.0 2>/dev/null ) + fi + echo $toolkit + + eval $LOGFE +} + # see which dm has started if any get_display_manager() {