New version: desktop/dm added: WindowMaker, WM2. Also added in legacy wmii2 which may work.

windowmaker and wm2 are detected via xprop -root, there is no version information for wm2 available
so if you know how to detect that, let me know.

New tarball as well, though no man page changes.
This commit is contained in:
inxi-svn 2013-01-09 19:33:08 +00:00
parent 4e82d9b4d9
commit 1688781f7f

32
inxi
View file

@ -1,8 +1,8 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 1.8.26
#### Date: December 22 2012
#### version: 1.8.27
#### Date: January 9 2013
#### Patch Number: 00
########################################################################
#### SPECIAL THANKS
@ -20,7 +20,7 @@
#### Gaim/Pidgin, Weechat, KVIrc and Kopete.
#### Original infobash author and copyright holder:
#### Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif
#### inxi version: Copyright (C) 2008-12 Scott Rogers & Harald Hope
#### inxi version: Copyright (C) 2008-2013 Scott Rogers & Harald Hope
#### Further fixes (listed as known): Horst Tritremmel <hjt at sidux.com>
#### Steven Barrett (aka: damentz) - usb audio patch; swap percent used patch
#### Jarett.Stevens - dmidecde -M patch for older systems with the /sys
@ -3438,6 +3438,21 @@ get_desktop_environment()
elif [[ -n $( grep -is '^I3_' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'i3' '^i3' '3' )
desktop_environment='i3'
elif [[ -n $( grep -is 'WINDOWMAKER' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'wmaker' '^Window[[:space:]]*Maker' 'NF' )
if [[ -n $version ]];then
version="$version "
fi
desktop_environment="WindowMaker"
elif [[ -n $( grep -is '^_WM2' <<< "$xprop_root" ) ]];then
# note; there isn't actually a wm2 version available but error handling should cover it and return null
# maybe one day they will add it?
version=$( get_de_app_version 'wm2' '^wm2' 'NF' )
# not certain will always have version, so keep output right if not
if [[ -n $version ]];then
version="$version "
fi
desktop_environment="WM2"
fi
fi
# a few manual hacks for things that don't id with xprop, these are just good guesses
@ -3463,6 +3478,10 @@ get_desktop_environment()
elif [[ -n $( grep -Eis '([[:space:]]|/)dwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version=$( get_de_app_version 'dwm' '^dwm' '1' )
desktop_environment='dwm'
elif [[ -n $( grep -is 'wmii2' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version=$( get_de_app_version 'wmii2' '^wmii2' '1' )
desktop_environment='wmii2'
# note: in debian at least, wmii is actuall wmii3
elif [[ -n $( grep -is 'wmii' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version=$( get_de_app_version 'wmii' '^wmii' '1' )
desktop_environment='wmii'
@ -3487,7 +3506,7 @@ get_de_app_version()
# mate-about -v = MATE Desktop Environment 1.4.0
case $1 in
dwm|jwm|mate-about|wmii)
dwm|jwm|mate-about|wmii|wmii2)
get_version='-v'
;;
esac
@ -3516,7 +3535,7 @@ get_de_app_version()
/'$2'/ {
# sample: dwm-5.8.2, ©.. etc, why no space? who knows. Also get rid of v in number string
# xfce, and other, output has , in it, so dump all commas
gsub(/(,|dwm-|wmii-|v|V)/, "",$'$3')
gsub(/(,|dwm-|wmii2-|wmii-|v|V)/, "",$'$3')
print $'$3'
exit # quit after first match prints
}' <<< "$version_data" )
@ -4520,7 +4539,8 @@ get_hard_drive_data_advanced()
## then we'll loop through that array looking for matches.
if [[ -n $( grep -E 'sd[a-z]' <<< ${A_HDD_DATA[@]} ) ]];then
# first pack the main ls variable so we don't have to keep using ls /dev...
ls_disk_by_id="$( ls -l /dev/disk/by-id )"
# not all systems have /dev/disk/by-id
ls_disk_by_id="$( ls -l /dev/disk/by-id 2>/dev/null )"
for (( i=0; i < ${#A_HDD_DATA[@]} - 1; i++ ))
do
if [[ -n $( grep -E '^sd[a-z]' <<< ${A_HDD_DATA[$i]} ) ]];then