small change, new version, making dm info, if present, show out of X as well. this can be useful if you for example have

ssh'ed into box, and don't remember what dm is running the desktop. Shows N/A if in X if nothing detected, does not show
out of X since could be a headless server.

Updated man page, new tarball.
This commit is contained in:
inxi-svn 2012-06-26 19:22:01 +00:00
parent 837b37477f
commit d85b9a1928
2 changed files with 19 additions and 10 deletions

26
inxi
View file

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 1.8.10 #### version: 1.8.11
#### Date: June 25 2012 #### Date: June 26 2012
#### Patch Number: 00 #### Patch Number: 00
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
@ -8394,13 +8394,7 @@ print_system_data()
if [[ -z $desktop_environment ]];then if [[ -z $desktop_environment ]];then
desktop_environment='N/A' desktop_environment='N/A'
fi fi
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
dm_data=$( get_display_manager )
if [[ -z $dm_data ]];then
dm_data='N/A'
fi
dm_data=" ${C1}dm$SEP3${C2} $dm_data"
fi
if [[ $B_EXTRA_EXTRA_EXTRA_DATA == 'true' ]];then if [[ $B_EXTRA_EXTRA_EXTRA_DATA == 'true' ]];then
de_extra_data=$( get_desktop_extra_data ) de_extra_data=$( get_desktop_extra_data )
if [[ -n $de_extra_data ]];then if [[ -n $de_extra_data ]];then
@ -8417,6 +8411,20 @@ print_system_data()
desktop_environment="tty$tty_session" desktop_environment="tty$tty_session"
desktop_type='Console' desktop_type='Console'
fi fi
# having dm type can be useful if you are accessing remote system
# or are out of X and don't remember which dm is running the system
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
dm_data=$( get_display_manager )
# here we only want the dm info to show N/A if in X
if [[ -z $dm_data && $B_RUNNING_IN_X == 'true' ]];then
dm_data='N/A'
fi
# only print out of X if dm_data has info, then it's actually useful, but
# for headless servers, no need to print dm stuff.
if [[ -n $dm_data ]];then
dm_data=" ${C1}dm$SEP3${C2} $dm_data"
fi
fi
de_distro_string="${C1}$desktop_type$SEP3${C2} $desktop_environment$de_extra_data$dm_data ${C1}Distro$SEP3${C2} $distro" de_distro_string="${C1}$desktop_type$SEP3${C2} $desktop_environment$de_extra_data$dm_data ${C1}Distro$SEP3${C2} $distro"
if [[ $B_EXTRA_DATA == 'true' ]];then if [[ $B_EXTRA_DATA == 'true' ]];then

3
inxi.8
View file

@ -216,7 +216,8 @@ Show sensors output (if sensors installed/configured): mobo/cpu/gpu temp; detect
fan speeds. Gpu temp only for Fglrx/Nvidia drivers. Nvidia shows screen number for > 1 screens. fan speeds. Gpu temp only for Fglrx/Nvidia drivers. Nvidia shows screen number for > 1 screens.
.TP .TP
.B -S .B -S
Show System information: host name, kernel, desktop environment (if in X), distro Show System information: host name, kernel, desktop environment (if in X), distro. With \fB-xx\fR show
dm - or startx - (only shows if present and running if out of X), and if in X, with \fB-xxx\fR show more desktop info, like shell/panel etc.
.TP .TP
.B -t \fR[\fBc\fR or\fB m\fR or\fB cm\fR or\fB mc NUMBER\fR]\fR .B -t \fR[\fBc\fR or\fB m\fR or\fB cm\fR or\fB mc NUMBER\fR]\fR
Show processes. If followed by numbers \fB1-20\fR, shows that number of processes for each type Show processes. If followed by numbers \fB1-20\fR, shows that number of processes for each type