mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
added i3 wm to desktop detection, new tarball as well. Version bump since this is a real change.
This commit is contained in:
parent
fb69777002
commit
c05fd8d332
55
inxi
55
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.8.8
|
#### version: 1.8.9
|
||||||
#### Date: June 24 2012
|
#### Date: June 24 2012
|
||||||
#### Patch Number: 00
|
#### Patch Number: 00
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -3318,6 +3318,9 @@ get_desktop_environment()
|
||||||
# ENLIGHTENMENT_VERSION(STRING) = "Enlightenment 0.16.999.49898"
|
# ENLIGHTENMENT_VERSION(STRING) = "Enlightenment 0.16.999.49898"
|
||||||
version=$( grep -is 'ENLIGHTENMENT_VERSION' <<< "$xprop_root" | cut -d '"' -f 2 | gawk '{print $2}' )
|
version=$( grep -is 'ENLIGHTENMENT_VERSION' <<< "$xprop_root" | cut -d '"' -f 2 | gawk '{print $2}' )
|
||||||
desktop_environment='Enlightenment'
|
desktop_environment='Enlightenment'
|
||||||
|
elif [[ -n $( grep -is '^I3_' <<< "$xprop_root" ) ]];then
|
||||||
|
version=$( get_de_app_version 'i3' '^i3' '3' )
|
||||||
|
desktop_environment='i3'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# a few manual hacks for things that don't id with xprop, these are just good guesses
|
# 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
|
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
|
# 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
|
# args: $1 - desktop command for --version; $2 - search string; $3 - gawk print number
|
||||||
get_de_app_version()
|
get_de_app_version()
|
||||||
|
@ -3421,6 +3399,31 @@ get_de_app_version()
|
||||||
echo $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
|
# see which dm has started if any
|
||||||
get_display_manager()
|
get_display_manager()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue