mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
loosened regex to handle future things like git, v12.2, b12.2 or whatever for desktop versions
This commit is contained in:
parent
0fc3ba54da
commit
c85ef425c5
15
inxi
15
inxi
|
@ -2640,13 +2640,13 @@ detect_desktop_environment()
|
|||
desktop_environment="Xfce"
|
||||
elif [[ -n $( grep -is 'BLACKBOX_PID' <<< "$xprop_root" ) ]];then
|
||||
if [[ -n $( grep -is 'fluxbox' <<< "$ps_aux" | grep -v 'grep' ) ]];then
|
||||
version=$( get_de_version 'fluxbox' 'fluxbox[[:space:]]([[:digit:]]|GIT)' '2' )
|
||||
version=$( get_de_version 'fluxbox' '^fluxbox' '2' )
|
||||
desktop_environment='Fluxbox'
|
||||
else
|
||||
desktop_environment='Blackbox'
|
||||
fi
|
||||
elif [[ -n $( grep -is 'OPENBOX_PID' <<< "$xprop_root" ) ]];then
|
||||
version=$( get_de_version 'openbox' 'openbox[[:space:]]([[:digit:]]|GIT)' '2' )
|
||||
version=$( get_de_version 'openbox' '^openbox' '2' )
|
||||
if [[ -n $( grep -is 'lxde' <<< "$ps_aux" | grep -v 'grep' ) ]];then
|
||||
if [[ -n $version ]];then
|
||||
version="(Openbox $version)"
|
||||
|
@ -2656,23 +2656,24 @@ detect_desktop_environment()
|
|||
desktop_environment='Openbox'
|
||||
fi
|
||||
elif [[ -n $( grep -is 'ICEWM' <<< "$xprop_root" ) ]];then
|
||||
version=$( get_de_version 'icewm' 'icewm[[:space:]]([[:digit:]]|GIT)' '2' )
|
||||
version=$( get_de_version 'icewm' '^icewm' '2' )
|
||||
desktop_environment='IceWM'
|
||||
fi
|
||||
fi
|
||||
# a few manual hacks for things that don't id with xprop, these are just good guesses
|
||||
# note that gawk is going to exit after first occurance of search string, so no need for extra
|
||||
if [[ -z $desktop_environment ]];then
|
||||
if [[ -n $( grep -is 'fvwm-crystal' <<< "$ps_aux" | grep -v 'grep' ) ]];then
|
||||
version=$( get_de_version 'fvwm' 'fvwm[[:space:]]([[:digit:]]|GIT)' '2' )
|
||||
version=$( get_de_version 'fvwm' '^fvwm' '2' )
|
||||
desktop_environment='FVWM-Crystal'
|
||||
elif [[ -n $( grep -is 'fvwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then
|
||||
version=$( get_de_version 'fvwm' 'fvwm[[:space:]]([[:digit:]]|GIT)' '2' )
|
||||
version=$( get_de_version 'fvwm' '^fvwm' '2' )
|
||||
desktop_environment='FVWM'
|
||||
elif [[ -n $( grep -is 'pekwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then
|
||||
version=$( get_de_version 'pekwm' 'pekwm.*([[:digit:]]|GIT)' '3' )
|
||||
version=$( get_de_version 'pekwm' '^pekwm' '3' )
|
||||
desktop_environment='pekwm'
|
||||
elif [[ -n $( grep -is 'awesome' <<< "$ps_aux" | grep -v 'grep' ) ]];then
|
||||
version=$( get_de_version 'awesome' 'awesome' '2' )
|
||||
version=$( get_de_version 'awesome' '^awesome' '2' )
|
||||
desktop_environment='Awesome'
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue