From c05fd8d332168149b7b70042d8a85df861b19318 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sun, 24 Jun 2012 20:34:14 +0000 Subject: [PATCH] added i3 wm to desktop detection, new tarball as well. Version bump since this is a real change. --- inxi | 55 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/inxi b/inxi index 707ca3a..88c804e 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.8.8 +#### version: 1.8.9 #### Date: June 24 2012 #### Patch Number: 00 ######################################################################## @@ -3318,6 +3318,9 @@ get_desktop_environment() # ENLIGHTENMENT_VERSION(STRING) = "Enlightenment 0.16.999.49898" version=$( grep -is 'ENLIGHTENMENT_VERSION' <<< "$xprop_root" | cut -d '"' -f 2 | gawk '{print $2}' ) desktop_environment='Enlightenment' + elif [[ -n $( grep -is '^I3_' <<< "$xprop_root" ) ]];then + version=$( get_de_app_version 'i3' '^i3' '3' ) + desktop_environment='i3' fi fi # a few manual hacks for things that don't id with xprop, these are just good guesses @@ -3359,31 +3362,6 @@ get_desktop_environment() eval $LOGFE } -get_desktop_extra_data() -{ - eval $LOGFS - local de_data=$( ps -A | gawk ' - BEGIN { - IGNORECASE=1 - desktops="" - separator="" - } - /(cinnamon|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 - separator = "," - } - } - END { - print desktops - } - ' ) - echo $de_data - - eval $LOGFE -} - # note: gawk doesn't support white spaces in search string, gave errors, so use [[:space:]] instead # args: $1 - desktop command for --version; $2 - search string; $3 - gawk print number get_de_app_version() @@ -3421,6 +3399,31 @@ get_de_app_version() echo $version } +get_desktop_extra_data() +{ + eval $LOGFS + local de_data=$( ps -A | gawk ' + BEGIN { + IGNORECASE=1 + desktops="" + separator="" + } + /(cinnamon|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 + separator = "," + } + } + END { + print desktops + } + ' ) + echo $de_data + + eval $LOGFE +} + # see which dm has started if any get_display_manager() {