mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
changed toolkit to show only with -xS, that's not that important.
This commit is contained in:
parent
bb43c32dbc
commit
32096b167f
52
inxi
52
inxi
|
@ -1692,7 +1692,7 @@ show_options()
|
|||
print_screen_output " 4 - Also show partition size/filled data for (if present):/, /home, /var/, /boot"
|
||||
print_screen_output " 5 - For multicore systems, also shows: per core clock speeds; audio card; full disk data."
|
||||
print_screen_output "-x Show extra data: bogomips on Cpu; driver version (if available) for Network/Audio;"
|
||||
print_screen_output " for network, audio cards, shows PCI Bus ID number also;"
|
||||
print_screen_output " for network, audio cards, shows PCI Bus ID number also; for System, shows Desktop toolkit if avaliable"
|
||||
print_screen_output " direct rendering status for Graphics (in X). Only works with verbose or line output;"
|
||||
print_screen_output " shows (for single gpu, nvidia driver) screen number gpu is running on."
|
||||
print_screen_output " Shows hdd temp with disk data if you have hddtemp installed, if you are root OR if you have"
|
||||
|
@ -2546,7 +2546,7 @@ detect_desktop_environment()
|
|||
eval $LOGFS
|
||||
|
||||
# set the default, this function only runs in X, if null, don't print data out
|
||||
local desktop_environment='N/A' xprop_root='' ps_aux=''
|
||||
local desktop_environment='' xprop_root='' ps_aux=''
|
||||
local version='' version_data='' toolkit=''
|
||||
|
||||
# note, GNOME_DESKTOP_SESSION_ID is deprecated so we'll see how that works out
|
||||
|
@ -2556,13 +2556,15 @@ detect_desktop_environment()
|
|||
if [[ -n $version ]];then
|
||||
version=" $version"
|
||||
fi
|
||||
# this is a hack, and has to be changed with every toolkit version change
|
||||
toolkit=$( pkg-config --modversion gtk+-3.0 2>/dev/null )
|
||||
if [[ -z $toolkit ]];then
|
||||
toolkit=$( pkg-config --modversion gtk+-2.0 2>/dev/null )
|
||||
fi
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Gtk: $toolkit)"
|
||||
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||
# this is a hack, and has to be changed with every toolkit version change
|
||||
toolkit=$( pkg-config --modversion gtk+-3.0 2>/dev/null )
|
||||
if [[ -z $toolkit ]];then
|
||||
toolkit=$( pkg-config --modversion gtk+-2.0 2>/dev/null )
|
||||
fi
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Gtk: $toolkit)"
|
||||
fi
|
||||
fi
|
||||
desktop_environment="Gnome${version}"
|
||||
# assume 5 will id the same, why not, no need to update in future
|
||||
|
@ -2572,9 +2574,11 @@ detect_desktop_environment()
|
|||
if [[ -z $version ]];then
|
||||
version='5'
|
||||
fi
|
||||
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Qt $toolkit)"
|
||||
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Qt $toolkit)"
|
||||
fi
|
||||
fi
|
||||
desktop_environment="KDE $version"
|
||||
elif [[ $KDE_SESSION_VERSION == '4' ]]; then
|
||||
|
@ -2583,9 +2587,11 @@ detect_desktop_environment()
|
|||
if [[ -z $version ]];then
|
||||
version='4'
|
||||
fi
|
||||
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Qt $toolkit)"
|
||||
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Qt $toolkit)"
|
||||
fi
|
||||
fi
|
||||
desktop_environment="KDE $version"
|
||||
# KDE_FULL_SESSION property is only available since KDE 3.5.5.
|
||||
|
@ -2596,9 +2602,11 @@ detect_desktop_environment()
|
|||
if [[ -z $version ]];then
|
||||
version='3.5'
|
||||
fi
|
||||
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Qt $toolkit)"
|
||||
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
|
||||
if [[ -n $toolkit ]];then
|
||||
version="$version (Qt $toolkit)"
|
||||
fi
|
||||
fi
|
||||
desktop_environment="KDE $version"
|
||||
# note: fluxbox has a positive PID for blackbox, so I think most desktops can be detected
|
||||
|
@ -2655,7 +2663,7 @@ detect_desktop_environment()
|
|||
fi
|
||||
fi
|
||||
# a few manual hacks for things that don't id with xprop, these are just good guesses
|
||||
if [[ $desktop_environment == 'N/A' ]];then
|
||||
if [[ -z $desktop_environment ]];then
|
||||
if [[ -n $( grep -is 'fvwm-crystal' <<< "$ps_aux" | grep -v 'grep' ) ]];then
|
||||
version=$( fvwm --version 2>/dev/null | grep -Esi 'fvwm [[:digit:]]' | gawk '{print $2}' )
|
||||
if [[ -n $version ]];then
|
||||
|
@ -6111,7 +6119,11 @@ print_system_data()
|
|||
|
||||
# I think these will work, maybe, if logged in as root and in X
|
||||
if [[ $B_RUNNING_IN_X == 'true' ]];then
|
||||
desktop_environment="${C1}Desktop${C2} $( detect_desktop_environment ) "
|
||||
desktop_environment=$( detect_desktop_environment )
|
||||
if [[ -z $desktop_environment ]];then
|
||||
desktop_environment='N/A'
|
||||
fi
|
||||
desktop_environment="${C1}Desktop${C2} $desktop_environment "
|
||||
fi
|
||||
|
||||
# check for 64 bit first
|
||||
|
|
Loading…
Reference in a new issue