diff --git a/inxi b/inxi index dac5cc6..b0696b5 100755 --- a/inxi +++ b/inxi @@ -2822,9 +2822,12 @@ get_desktop_environment() elif [[ -n $( grep -is 'awesome' <<< "$ps_aux" | grep -v 'grep' ) ]];then version=$( get_de_version 'awesome' '^awesome' '2' ) desktop_environment='Awesome' - elif [[ -n $( grep -is 'twm' <<< "$ps_aux" | grep -v 'grep' ) ]];then + elif [[ -n $( grep -is 'scrotwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then + version=$( get_de_version 'scrotwm' '^welcome.*scrotwm' '4' ) + desktop_environment='Scrotwm' # no --version for this one + elif [[ -n $( grep -is '[[:space:]]twm' <<< "$ps_aux" | grep -v 'grep' ) ]];then desktop_environment='Twm' # no --version for this one - elif [[ -n $( grep -is 'dwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then + elif [[ -n $( grep -is '[[:space:]]dwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then version=$( get_de_version 'dwm' '^dwm' '1' ) desktop_environment='dwm' elif [[ -n $( grep -is 'wmii' <<< "$ps_aux" | grep -v 'grep' ) ]];then @@ -2857,7 +2860,8 @@ get_de_version() IGNORECASE=1 } /'$2'/ { - sub(/(dwm-|wmii-)/, "",$'$3') # sample: dwm-5.8.2, ©.. etc, why no space? who knows. + # sample: dwm-5.8.2, ©.. etc, why no space? who knows. Also get rid of v in number string + sub(/(dwm-|wmii-|v)/, "",$'$3') gsub(",","",$0) # xfce, and other, output has , in it, so dump all commas print $'$3' exit # quit after first match prints