mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 08:11:39 +00:00
New version, new man. ARM enhancements and updates, -S data ongoing enhancements.
Fixes: 1. Added support for new ARM SOC types, including chromebook ARM. Note that so far I have been unable to find a way to detect MMC networking, at least in a meaningful way. I know where the data is, but I can't figure out how to reasonably integrate it into the main ARM soc/device generator logic because it's fundamentally different from most platform or devicetree data. 2. Added alternate battery tests, this should cover a wide range of alternate battery IDs, while still preserving the distinction between system power batteries, and device batteries. The detection is now far more dynamic, and can handle unknown syntax for battery ID, while not losing the ability to correctly identify device batteries (like mice, keyboards, etc). 3. Trying a somewhat unreliable hack to get cpu variant for arm devices where the current method fails. this may be removed if it causes false ID in the future. 4. Excluded all /driver/ paths from ARM SOC @pci generation, those give read errors even as root. 5. Fixed a few defective wm version detections. Enhancements: The -S line continues to see many improvements. 1. Greatly expanded the set of info: items, now it covers all the toolbars, panels, and docks that I could find, plus a few things like icewmtray, where the wm has a built in panel. While there are probably more bar/panel/dock tools out there, and more will get added if or when they are encountered, now info: shows far more variants than ever before, and covers the range of options simpler wm users have for bars, trays, and panels. If I missed one that is detectable, by all means show how to detect it! 2. Fine tuned and added a few more window managers, and added version for some that were not showing versions. 3. Added 3 more dm version handlers, slim, gdm, gdm3, and refactored that code to use the same program_values/program_version logic that the other tools use. 4. A few more obscure and usb stick vendor IDs added.
This commit is contained in:
parent
ca54311ede
commit
8b2259e455
204
inxi
204
inxi
|
@ -31,8 +31,8 @@ use POSIX qw(uname strftime ttyname);
|
|||
|
||||
## INXI INFO ##
|
||||
my $self_name='inxi';
|
||||
my $self_version='3.0.19';
|
||||
my $self_date='2018-07-23';
|
||||
my $self_version='3.0.20';
|
||||
my $self_date='2018-07-30';
|
||||
my $self_patch='00';
|
||||
## END INXI INFO ##
|
||||
|
||||
|
@ -3130,7 +3130,7 @@ sub program_values {
|
|||
'weechat-curses' => ['[0-9.]+',1,'-v','WeeChat',1,0,0],
|
||||
'xchat-gnome' => ['[0-9.]+',2,'-v','X-Chat-Gnome',1,1,0],
|
||||
'xchat' => ['[0-9.]+',2,'-v','X-Chat',1,1,0],
|
||||
## Desktops / wm
|
||||
## Desktops / wm / compositors
|
||||
'3dwm' => ['^3dwm',0,'0','3dwm',0,1,0], # unknown syntax
|
||||
'9wm' => ['^9wm',3,'-version','9wm',0,1,0],
|
||||
'afterstep' => ['^afterstep',3,'--version','AfterStep',0,1,0],
|
||||
|
@ -3145,7 +3145,7 @@ sub program_values {
|
|||
'deepin-metacity' => ['^metacity',2,'--version','Deepin-Metacity',0,1,0],
|
||||
'deepin-mutter' => ['^mutter',2,'--version','Deepin-Mutter',0,1,0],
|
||||
'deepin-wm' => ['^gala',0,'0','DeepinWM',0,1,0],
|
||||
'dwm' => ['^dwm',1,'-v','Dwm',0,1,1],
|
||||
'dwm' => ['^dwm',1,'-v','dwm',0,1,1],
|
||||
'fluxbox' => ['^fluxbox',2,'--version','Fluxbox',0,1,0],
|
||||
'flwm' => ['^flwm',0,'0','FLWM',0,0,1],
|
||||
'fvwm' => ['^fvwm',2,'--version','FVWM',0,0,1],
|
||||
|
@ -3155,7 +3155,7 @@ sub program_values {
|
|||
'gala' => ['^gala',2,'--version','gala',0,1,0], # super slow result
|
||||
'gnome-about' => ['gnome',3,'--version','Gnome',0,1,0],
|
||||
'gnome-shell' => ['gnome',3,'--version','Gnome',0,1,0],
|
||||
# with path, returns /sbin/herbstluftwm [version]
|
||||
# with path, returns: /sbin/herbstluftwm [version]
|
||||
'herbstluftwm' => ['herbstluftwm',2,'--version','herbstluftwm',0,1,0],
|
||||
'jwm' => ['^jwm',2,'--version','JWM',0,1,0],
|
||||
# i3 version 4.13 (2016-11-08) © 2009 Michael Stapelberg and contributors
|
||||
|
@ -3191,7 +3191,8 @@ sub program_values {
|
|||
'ratpoison' => ['^ratpoison',2,'--version','Ratpoison',0,1,0],
|
||||
'sawfish' => ['^sawfish',3,'--version','Sawfish',0,1,0],
|
||||
'scrotwm' => ['^scrotwm.*welcome.*',5,'-v','Scrotwm',0,1,1],
|
||||
'spectrwm' => ['^spectrwm.*welcome.*wm',5,'-v','Spectrwm',0,1,0],
|
||||
'spectrwm' => ['^spectrwm.*welcome.*wm',5,'-v','Spectrwm',0,1,1],
|
||||
'twin' => ['^Twin:',2,'--version','Twin',0,0,0],
|
||||
'twm' => ['^twm',0,'0','twm',0,1,0],
|
||||
'unity' => ['^unity',2,'--version','Unity',0,1,0],
|
||||
'windowlab' => ['^windowlab',2,'-about','WindowLab',0,1,0],
|
||||
|
@ -3205,6 +3206,11 @@ sub program_values {
|
|||
# command: xfdesktop
|
||||
'xfdesktop-toolkit' => ['Built[[:space:]]with[[:space:]]GTK',4,'--version','Gtk',0,1,0],
|
||||
'xmonad' => ['^xmonad',2,'--version','XMonad',0,1,0],
|
||||
## display managers (dm)
|
||||
'gdm' => ['^gdm',2,'--version','gdm',0,1,0],
|
||||
'gdm3' => ['^gdm',2,'--version','gdm3',0,1,0],
|
||||
'lightdm' => ['^lightdm',2,'--version','lightdm',0,1,1],
|
||||
'slim' => ['slim version',3,'-v','slim',0,1,0],
|
||||
## Shells
|
||||
'bash' => ['^GNU[[:space:]]bash,[[:space:]]version',4,'--version','Bash',1,0,0],
|
||||
'csh' => ['^tcsh',2,'--version','csh',1,0,0],
|
||||
|
@ -4929,7 +4935,7 @@ sub apply_filter {
|
|||
}
|
||||
sub arm_cleaner {
|
||||
my ($item) = @_;
|
||||
$item =~ s/(\(?Device Tree\)?)//gi;
|
||||
$item =~ s/(\([^\(]*Device Tree[^\)]*\))//gi;
|
||||
$item =~ s/\s\s+/ /g;
|
||||
$item =~ s/^\s+|\s+$//g;
|
||||
return $item;
|
||||
|
@ -5111,6 +5117,17 @@ sub pci_long_filter {
|
|||
return $string;
|
||||
}
|
||||
|
||||
# sometimes the pattern comes from unknown strings
|
||||
# which can contain regex characters, get rid of those
|
||||
sub regex_cleaner {
|
||||
my ($string) = @_;
|
||||
return if ! $string;
|
||||
$string =~ s/(\{|\}|\(|\)|\[|\]|\|)/ /g;
|
||||
$string =~ s/\s\s+/ /g;
|
||||
$string =~ s/^\s+|\s+$//g;
|
||||
return $string;
|
||||
}
|
||||
|
||||
sub row_defaults {
|
||||
my ($type,$id) = @_;
|
||||
$id ||= '';
|
||||
|
@ -5672,7 +5689,7 @@ sub card_data {
|
|||
foreach (@pci){
|
||||
$num = 1;
|
||||
my @row = @$_;
|
||||
if ($row[0] =~ /^(audio|daudio|hdmi|multimedia)$/){
|
||||
if ($row[0] =~ /^(audio|daudio|hdmi|hdmi-audio|multimedia)$/){
|
||||
$j = scalar @rows;
|
||||
my $driver = $row[9];
|
||||
$driver ||= 'N/A';
|
||||
|
@ -5701,7 +5718,14 @@ sub card_data {
|
|||
$rows[$j]{main::key($num++,'bus ID')} = (!$row[2] && !$row[3]) ? 'N/A' : "$row[2].$row[3]";
|
||||
}
|
||||
if ($extra > 1){
|
||||
$rows[$j]{main::key($num++,'chip ID')} = ($row[5]) ? "$row[5]:$row[6]" : $row[6];
|
||||
my $chip_id = 'N/A';
|
||||
if ($row[5] && $row[6]){
|
||||
$chip_id = "$row[5]:$row[6]";
|
||||
}
|
||||
elsif ($row[6]){
|
||||
$chip_id = $row[6];
|
||||
}
|
||||
$rows[$j]{main::key($num++,'chip ID')} = $chip_id;
|
||||
}
|
||||
}
|
||||
#print "$row[0]\n";
|
||||
|
@ -5766,7 +5790,6 @@ sub usb_data {
|
|||
if (@ids){
|
||||
if (!$bsd_type && !$b_usb_check){
|
||||
main::set_usb_data();
|
||||
$b_usb_check = 1;
|
||||
}
|
||||
}
|
||||
main::log_data('dump','@ids',\@ids) if $b_log;
|
||||
|
@ -6103,16 +6126,11 @@ sub battery_data_sys {
|
|||
$b_ma = 0;
|
||||
$id = $item;
|
||||
$id =~ s%/sys/class/power_supply/%%g;
|
||||
my $purpose = ($id =~ /^(BAT|CMB).*$/) ? 'primary': 'device';
|
||||
# don't create arrays of device data if it's not going to show
|
||||
next if $extra == 0 && $purpose ne 'primary';
|
||||
$battery{$id} = ({});
|
||||
# NOTE: known ids: BAT[0-9] CMB[0-9]
|
||||
$battery{$id}{'purpose'} = $purpose;
|
||||
foreach $file (@items){
|
||||
$path = "$item/$file";
|
||||
$value = (-f $path) ? (main::reader($path))[0]: '';
|
||||
# mains
|
||||
# mains, plus in psu
|
||||
if ($file eq 'type' && $value && lc($value) ne 'battery' ){
|
||||
$battery{$id}{'purpose'} = 'mains';
|
||||
}
|
||||
|
@ -6161,6 +6179,21 @@ sub battery_data_sys {
|
|||
$battery{$id}{$file} = $value;
|
||||
# print "$battery{$id}{$file}\n";
|
||||
}
|
||||
# note, too few data sets, there could be sbs-charger but not sure
|
||||
if (!$battery{$id}{'purpose'}){
|
||||
# NOTE: known ids: BAT[0-9] CMB[0-9]. arm may be like: sbs- sbm- but just check
|
||||
# if the energy/charge values exist for this item, if so, it's a battery, if not,
|
||||
# it's a device.
|
||||
if ($id =~ /^(BAT|CMB).*$/i ||
|
||||
( $battery{$id}{'energy_full'} || $battery{$id}{'charge_full'} ||
|
||||
$battery{$id}{'energy_now'} || $battery{$id}{'charge_now'} ||
|
||||
$battery{$id}{'energy_full_design'} || $battery{$id}{'charge_full_design'} ) ){
|
||||
$battery{$id}{'purpose'} = 'primary';
|
||||
}
|
||||
else {
|
||||
$battery{$id}{'purpose'} = 'device';
|
||||
}
|
||||
}
|
||||
# note:voltage_now fluctuates, which will make capacity numbers change a bit
|
||||
# if any of these values failed, the math will be wrong, but no way to fix that
|
||||
# tests show more systems give right capacity/charge with voltage_min_design
|
||||
|
@ -7366,9 +7399,8 @@ sub get_boost_status {
|
|||
}
|
||||
sub arm_cpu_name {
|
||||
eval $start if $b_log;
|
||||
my (%cpus,$compat);
|
||||
if ( -e '/sys/firmware/devicetree/base/cpus/cpu@1/compatible' ){
|
||||
my @working = main::globber('/sys/firmware/devicetree/base/cpus/cpu@*/compatible');
|
||||
my (%cpus,$compat,@working);
|
||||
if (@working = main::globber('/sys/firmware/devicetree/base/cpus/cpu@*/compatible')){
|
||||
foreach my $file (@working){
|
||||
$compat = (main::reader($file))[0];
|
||||
# these can have non printing ascii... why? As long as we only have the
|
||||
|
@ -7378,6 +7410,17 @@ sub arm_cpu_name {
|
|||
$cpus{$compat} = ($cpus{$compat}) ? ++$cpus{$compat}: 1;
|
||||
}
|
||||
}
|
||||
# synthesize it, [4] will be like: cortex-a15-timer; sunxi-timer
|
||||
# so far all with this directory show soc name, not cpu name for timer
|
||||
elsif (! -d '/sys/firmware/devicetree/base' && @pci){
|
||||
foreach my $ref (@pci){
|
||||
@working = @$ref;
|
||||
next if $working[0] ne 'timer' || !$working[4];
|
||||
$working[4] =~ s/(-system)?-timer$//;
|
||||
$compat = $working[4];
|
||||
$cpus{$compat} = ($cpus{$compat}) ? ++$cpus{$compat}: 1;
|
||||
}
|
||||
}
|
||||
main::log_data('dump','%cpus',\%cpus) if $b_log;
|
||||
eval $end if $b_log;
|
||||
return %cpus;
|
||||
|
@ -8286,10 +8329,10 @@ sub device_vendor {
|
|||
['^(FUJITSU|MP)','^FUJITSU','Fujitsu',''],
|
||||
# note: 2012: wdc bought hgst
|
||||
['^(HGST)','^HGST','HGST (Hitachi)',''], # HGST HUA
|
||||
['^(Hitachi|HDS|IC|HT|HU)','^Hitachi','Hitachi',''],
|
||||
['^(Hitachi|HDS|HDT|IC|HT|HU)','^Hitachi','Hitachi',''],
|
||||
['^Hoodisk','^Hoodisk','Hoodisk',''],
|
||||
['^(HP\b)','^HP','HP',''], # vb: VB0250EAVER but clashes with vbox; HP_SSD_S700_120G
|
||||
['^(LSD|Lexar)','^Lexar','Lexar',''], # mmc-LEXAR_0xb016546c
|
||||
['^(LSD|Lexar|JumpDrive)','^Lexar','Lexar',''], # mmc-LEXAR_0xb016546c
|
||||
# OCZSSD2-2VTXE120G is OCZ-VERTEX2_3.5
|
||||
['^(OCZ|APOC|D2|DEN|DEN|DRSAK|EC188|FTNC|GFGC|MANG|MMOC|NIMC|NIMR|PSIR|TALOS2|TMSC|TRSAK)','^OCZ[\s\-]','OCZ',''],
|
||||
['^OWC','^OWC[\s\-]','OWC',''],
|
||||
|
@ -8346,7 +8389,7 @@ sub device_vendor {
|
|||
['^SigmaTel','^SigmaTel','SigmaTel',''],
|
||||
['^SPPC','','Silicon Power',''],
|
||||
['^(SK\s?HYNIX|HFS)','^SK\s?HYNIX','SK Hynix',''], # HFS128G39TND-N210A
|
||||
['^hynix','hynix','Hynix',''],# nvme middle of string, must be after sk hynix
|
||||
['hynix','hynix','Hynix',''],# nvme middle of string, must be after sk hynix
|
||||
['^SH','','Smart Modular Tech.',''],
|
||||
['^(SMART( Storage Systems)?|TX)','^(SMART( Storage Systems)?)','Smart Storage Systems',''],
|
||||
['^(S[FR]-|Sony)','^Sony','Sony',''],
|
||||
|
@ -8579,7 +8622,7 @@ sub card_data {
|
|||
$num = 1;
|
||||
my @row = @$_;
|
||||
#print "$row[0] $row[3]\n";
|
||||
if ($row[3] == 0 && ( $row[0] =~ /^(vga|disp|display|3d|fb|gpu|hdmi)$/ ) ){
|
||||
if ($row[3] == 0 && ( $row[0] =~ /^(vga|disp|display|display-port-controller|3d|fb|gpu|hdmi|mali)$/ ) ){
|
||||
#print "$row[0] $row[3]\n";
|
||||
$j = scalar @rows;
|
||||
$driver = $row[9];
|
||||
|
@ -9328,9 +9371,8 @@ sub create_output_soc {
|
|||
$rows[$j]{main::key($num++,'System')} = $soc_machine{'model'};
|
||||
$system = 'details';
|
||||
}
|
||||
my $device = $soc_machine{'device'};
|
||||
$device ||= 'N/A';
|
||||
$rows[$j]{main::key($num++,$system)} = $device;
|
||||
$soc_machine{'device'} ||= 'N/A';
|
||||
$rows[$j]{main::key($num++,$system)} = $soc_machine{'device'};
|
||||
}
|
||||
# we're going to print N/A for 0000 values sine the item was there.
|
||||
if ($soc_machine{'firmware'}){
|
||||
|
@ -9446,10 +9488,8 @@ sub machine_data_soc {
|
|||
if ( $model ){
|
||||
$model = main::dmi_cleaner($model);
|
||||
$model = (split /\x01|\x02|\x03|\x00/, $model)[0] if $model;
|
||||
# idea was to use only first part of string, but now try using all
|
||||
#my (@result) = ();
|
||||
#@result = split(/\s+/, $soc_machine{'device'}) if $soc_machine{'device'};
|
||||
if ( !$soc_machine{'device'} || ($model && $model !~ /$soc_machine{'device'}/i) ){
|
||||
my $device_temp = main::regex_cleaner($soc_machine{'device'});
|
||||
if ( !$soc_machine{'device'} || ($model && $model !~ /$device_temp/i) ){
|
||||
$model = main::arm_cleaner($model);
|
||||
$soc_machine{'model'} = $model;
|
||||
}
|
||||
|
@ -11655,6 +11695,7 @@ sub mdraid_data {
|
|||
#$mdstat = "$ENV{'HOME'}/bin/scripts/inxi/data/raid/md-rebuild-1.txt";
|
||||
#$mdstat = "$ENV{'HOME'}/bin/scripts/inxi/data/raid/md-2-mirror-fserver2-1.txt";
|
||||
#$mdstat = "$ENV{'HOME'}/bin/scripts/inxi/data/raid/md-2-raid10-abucodonosor.txt";
|
||||
# $mdstat = "$ENV{'HOME'}/bin/scripts/inxi/data/raid/md-2-raid10-ant.txt";
|
||||
my @working = main::reader($mdstat,'strip');
|
||||
#print Data::Dumper::Dumper \@working;
|
||||
my (@data,@mdraid,@temp,$b_found,$system,$unused);
|
||||
|
@ -11680,7 +11721,7 @@ sub mdraid_data {
|
|||
my $component_string = $5;
|
||||
@temp = ();
|
||||
$raid =~ s/^raid1$/mirror/;
|
||||
$raid =~ s/^raid/raid-/;
|
||||
$raid =~ s/^raid/raid-/;
|
||||
$raid = 'mirror' if $raid eq '1';
|
||||
# remember, these include the [x] id, so remove that for disk/unmounted
|
||||
my @components = split /\s+/, $component_string;
|
||||
|
@ -13277,7 +13318,7 @@ sub create_output {
|
|||
my $ambient_temp = $sensors{'ambient-temp'} . $temp_unit;
|
||||
$rows[$j]{main::key($num++,'ambient')} = $ambient_temp;
|
||||
}
|
||||
if (scalar @gpu == 1){
|
||||
if (scalar @gpu == 1 && defined $gpu[0]{'temp'}){
|
||||
my $gpu_temp = $gpu[0]{'temp'};
|
||||
my $gpu_type = $gpu[0]{'type'};
|
||||
my $gpu_unit = (defined $gpu[0]{'temp-unit'} && $gpu_temp ) ? " $gpu[0]{'temp-unit'}" : ' C';
|
||||
|
@ -15631,9 +15672,14 @@ sub get_wm_version {
|
|||
sub set_info_data {
|
||||
eval $start if $b_log;
|
||||
my (@data,@info,$item);
|
||||
my $pattern = 'dde-dock|gnome-panel|kicker|lemonbar|lxpanel|lxqt-panel|matchbox-panel|';
|
||||
$pattern .= 'mate-panel|plasma-desktop|plasma-netbook|polybar|razor-panel|razorqt-panel|';
|
||||
$pattern .= 'wingpanel|xfce4-panel|xfce5-panel|yabar';
|
||||
my $pattern = 'awn|bar|bmpanel|bmpanel2|budgie-panel|cairo-dock|';
|
||||
$pattern .= 'dde-dock|dmenu|dockbarx|docky|dzen|dzen2|';
|
||||
$pattern .= 'fbpanel|fspanel|gnome-panel|hpanel|i3bar|icewmtray|kicker|';
|
||||
$pattern .= 'lemonbar|ltpanel|lxpanel|lxqt-panel|matchbox-panel|';
|
||||
$pattern .= 'mate-panel|plank|plasma-desktop|plasma-netbook|polybar|pypanel|';
|
||||
$pattern .= 'razor-panel|razorqt-panel|tint2|';
|
||||
$pattern .= 'vala-panel|wbar|wharf|wingpanel|witray|';
|
||||
$pattern .= 'xfce4-panel|xfce5-panel|xmobar|yabar';
|
||||
if (@data = grep {/^($pattern)$/} @ps_gui ) {
|
||||
# only one entry per type, can be multiple
|
||||
foreach $item (@data){
|
||||
|
@ -15679,9 +15725,8 @@ sub get_display_manager {
|
|||
my @dms = qw(entranced.pid gdm.pid gdm3.pid kdm.pid ldm.pid
|
||||
lightdm.pid lxdm.pid mdm.pid nodm.pid pcdm.pid sddm.pid slim.lock
|
||||
tint2.pid wdm.pid xdm.pid xenodm.pid);
|
||||
# these are the only one I know of so far that have --version
|
||||
# lightdm outputs to stderr, so it has to be redirected
|
||||
my @dms_version = qw(gdm3 lightdm);
|
||||
# these are the only one I know of so far that have version info
|
||||
my @dms_version = qw(gdm gdm3 lightdm slim);
|
||||
$b_run = 1 if -d "/run";
|
||||
# in most linux, /var/run is a sym link to /run, so no need to check it twice
|
||||
if ( -d "/var/run" ){
|
||||
|
@ -15703,8 +15748,8 @@ sub get_display_manager {
|
|||
( $b_vrunrc && ( -f "/var/run/rc.d/$working" || -d "/var/run/rc.d/$id" ) ) ) &&
|
||||
! grep {/$working/} @found ){
|
||||
if ($extra > 2 && awk( \@dms_version, $working) && (my $path = main::check_program($working)) ){
|
||||
@data = main::grabber("$path --version 2>&1");
|
||||
$temp = awk(\@data,'\S',2,'\s+');
|
||||
@data = main::program_values($working);
|
||||
$temp = main::program_version($path,$data[0],$data[1],$data[2],$data[5],$data[6]);
|
||||
$working .= ' ' . $temp if $temp;
|
||||
}
|
||||
push @found, $working;
|
||||
|
@ -15811,7 +15856,6 @@ sub get_linux_distro {
|
|||
# if it contains their names. Last check below
|
||||
if ( @osr && ( grep {/(manjaro|antergos|chakra|pclinuxos|zorin)/i} @osr ) ){
|
||||
$distro_file = $os_release;
|
||||
#$system_base = 'Arch Linux';
|
||||
}
|
||||
$distro_id = 'armbian' if grep {/armbian/} @distro_files;
|
||||
main::log_data('dump','@distro_files',\@distro_files) if $b_log;
|
||||
|
@ -16527,9 +16571,11 @@ sub get_pci_vendor {
|
|||
my ($device, $subsystem) = @_;
|
||||
return if !$subsystem;
|
||||
my ($vendor,$sep) = ('','');
|
||||
# get rid of any [({ type characters that will make regex fail
|
||||
$subsystem = regex_cleaner($subsystem);
|
||||
my @data = split /\s+/, $subsystem;
|
||||
foreach (@data){
|
||||
if ($device !~ !/\b$_\b/){
|
||||
if ($device !~ /\b$_\b/){
|
||||
$vendor .= $sep . $_;
|
||||
$sep = ' ';
|
||||
}
|
||||
|
@ -16954,6 +17000,7 @@ sub set_dmesg_boot_data {
|
|||
# got here, we're good.
|
||||
sub set_dmi_data {
|
||||
eval $start if $b_log;
|
||||
$_[0] = 1; # check boolean passed by reference
|
||||
if ($alerts{'dmidecode'}{'action'} eq 'use' ){
|
||||
set_dmidecode_data();
|
||||
}
|
||||
|
@ -17190,6 +17237,7 @@ sub set_ifconfig {
|
|||
|
||||
sub set_pci_data {
|
||||
eval $start if $b_log;
|
||||
$_[0] = 1; # check boolean passed by reference
|
||||
if ( $b_pci ){
|
||||
if (!$bsd_type){
|
||||
if ($alerts{'lspci'}{'action'} eq 'use' ){
|
||||
|
@ -17413,6 +17461,8 @@ sub set_pciconf_data {
|
|||
# /sys/devices/soc.0/1c30000.eth/uevent
|
||||
## 8
|
||||
# /sys/devices/wlan.26/uevent [from pine64]
|
||||
## 9
|
||||
# sys/devices/platform/audio/uevent:["DRIVER=bcm2835_AUD0", "OF_NAME=audio"
|
||||
sub set_soc_data {
|
||||
eval $start if $b_log;
|
||||
my ($content,@files,@temp2,@temp3,@working);
|
||||
|
@ -17420,6 +17470,8 @@ sub set_soc_data {
|
|||
@files = globber('/sys/devices/platform/soc*/*/uevent');
|
||||
@temp2 = globber('/sys/devices/platform/soc*/*/*/uevent');
|
||||
@files = (@files,@temp2) if @temp2;
|
||||
@temp2 = globber('/sys/devices/platform/*/uevent');
|
||||
@files = (@files,@temp2) if @temp2;
|
||||
}
|
||||
if (globber('/sys/devices/soc*')){
|
||||
@temp2 = globber('/sys/devices/soc*/*/uevent');
|
||||
|
@ -17430,8 +17482,8 @@ sub set_soc_data {
|
|||
@temp2 = globber('/sys/devices/*/uevent'); # see case 8
|
||||
@files = (@files,@temp2) if @temp2;
|
||||
@temp2 = undef;
|
||||
# not sure why, but even as root/sudo, /subsystem/uevent is unreadable with -r test true
|
||||
@files = grep {!/subsystem/} @files if @files;
|
||||
# not sure why, but even as root/sudo, /subsystem|driver/uevent are unreadable with -r test true
|
||||
@files = grep {!/\/(subsystem|driver)\//} @files if @files;
|
||||
foreach my $file (@files){
|
||||
next if -z $file;
|
||||
my ($busid,$busid_nu,$chip_id,$device,$driver,$modules,$port,$rev,
|
||||
|
@ -17468,8 +17520,8 @@ sub set_soc_data {
|
|||
$rev = '';
|
||||
$modules = '';
|
||||
# note: use these for main Card match for -AGN
|
||||
$b_soc_audio = 1 if $type =~ /^(audio|daudio|hdmi|multimedia)$/;
|
||||
$b_soc_gfx = 1 if $type =~ /^(vga|disp|display|3d|fb|gpu|hdmi)$/;
|
||||
$b_soc_audio = 1 if $type =~ /^(audio|daudio|hdmi|hdmi-audio|multimedia)$/;
|
||||
$b_soc_gfx = 1 if $type =~ /^(vga|disp|display|display-port-controller|3d|fb|gpu|hdmi|mali)$/;
|
||||
$b_soc_net = 1 if $type =~ /^(eth|ethernet|ethernet-phy|network|wifi|wlan)$/;
|
||||
@temp3 = ($type,$type_id,$busid,$busid_nu,$device,$vendor_id,$chip_id,$rev,$port,$driver,$modules);
|
||||
@pci = (@pci,[@temp3]);
|
||||
|
@ -17505,31 +17557,35 @@ sub set_ps_gui {
|
|||
eval $start if $b_log;
|
||||
$b_ps_gui = 1;
|
||||
my ($working,@match,@temp);
|
||||
# desktops
|
||||
# desktops / wm
|
||||
if ($show{'system'}){
|
||||
@temp=qw(razor-desktop razor-session lxsession lxqt-session tdelauncher tdeinit_phase1);
|
||||
@temp=qw(razor-desktop razor-session lxsession lxqt-session
|
||||
tdelauncher tdeinit_phase1);
|
||||
@match = (@match,@temp);
|
||||
@temp=qw(afterstep awesome blackbox 3dwm dwm fluxbox flwm
|
||||
fvwm.*-crystal fvwm2 fvwm i3 jwm matchbox-panel openbox sawfish
|
||||
scrotwm spectrwm twm WindowMaker wm2 wmii2 wmii);
|
||||
@temp=qw(3dwm 9wm afterstep amiwm afterstep awesome
|
||||
blackbox bspwm dwm fluxbox flwm fvwm.*-crystal fvwm2 fvwm
|
||||
i3 jwm matchbox-window-manager mwm openbox notion pekwm ratpoison sawfish
|
||||
scrotwm spectrwm twm windowlab WindowMaker wm2 wmii2 wmii xmonad);
|
||||
@match = (@match,@temp);
|
||||
}
|
||||
# wm:
|
||||
if ($show{'system'} && $extra > 1){
|
||||
@temp=qw(9wm 3dwm afterstep amiwm awesome blackbox bspwm budgie-wm compiz
|
||||
deepin-wm dwm fluxbox flwm fvwm.*-crystal fvwm2 fvwm gala gnome-shell i3 jwm
|
||||
twin kwin_wayland kwin_x11 kwin marco matchbox-window-manager
|
||||
deepin-metacity metacity metisse mir muffin deepin-mutter mutter mwm
|
||||
notion openbox ratpoison sawfish scrotwm spectrwm twm
|
||||
windowlab WindowMaker wm2 wmii2 wmii xfwm4 xfwm5 xmonad);
|
||||
@temp=qw(budgie-wm compiz deepin-wm gala gnome-shell
|
||||
twin kwin_wayland kwin_x11 kwin marco
|
||||
deepin-metacity metacity metisse mir muffin deepin-mutter mutter
|
||||
xfwm4 xfwm5 xmonad);
|
||||
@match = (@match,@temp);
|
||||
}
|
||||
# info:
|
||||
if ($show{'system'} && $extra > 2){
|
||||
@temp=qw(budgie-panel dde-dock gnome-panel kicker lemonbar
|
||||
lxpanel lxqt-panel
|
||||
matchbox-panel mate-panel plasma-desktop plasma-netbook polybar
|
||||
razor-panel razorqt-panel wingpanel xfce4-panel xfce5-panel yabar);
|
||||
@temp=qw(awn bar bmpanel bmpanel2 budgie-panel cairo-dock
|
||||
dde-dock dmenu dockbarx docky dzen dzen2
|
||||
fbpanel fspanel gnome-panel hpanel
|
||||
i3bar icewmtray kicker lemonbar ltpanel lxpanel lxqt-panel
|
||||
matchbox-panel mate-panel
|
||||
perlpanel plank plasma-desktop plasma-netbook polybar pypanel
|
||||
razor-panel razorqt-panel tint2 vala-panel wbar wharf wingpanel witray
|
||||
xfce4-panel xfce5-panel xmobar yabar);
|
||||
@match = (@match,@temp);
|
||||
}
|
||||
# compositors (for wayland these are also the server, note
|
||||
|
@ -17598,6 +17654,7 @@ sub set_sysctl_data {
|
|||
# http://www.usb.org/developers/defined_class
|
||||
sub set_usb_data {
|
||||
eval $start if $b_log;
|
||||
$b_usb_check = 1;
|
||||
if ($alerts{'lsusb'}{'action'} eq 'use' ){
|
||||
#$usb_level = 2;
|
||||
# NOTE: we can't get reliable usb network device with short
|
||||
|
@ -17841,58 +17898,50 @@ sub generate_lines {
|
|||
assign_data(%row);
|
||||
}
|
||||
if ( $show{'machine'} ){
|
||||
if ($b_dmi && !$b_dmi_check ){
|
||||
set_dmi_data() ;
|
||||
$b_dmi_check = 1;
|
||||
}
|
||||
set_dmi_data($b_dmi_check) if $b_dmi && !$b_dmi_check;
|
||||
set_dmesg_boot_data() if ($bsd_type && !$b_dmesg_boot_check);
|
||||
%row = line_handler('Machine','machine');
|
||||
assign_data(%row);
|
||||
}
|
||||
if ( $show{'battery'} ){
|
||||
set_dmi_data() if $b_dmi && !$b_dmi_check;
|
||||
$b_dmi_check = 1;
|
||||
set_dmi_data($b_dmi_check) if $b_dmi && !$b_dmi_check;
|
||||
%row = line_handler('Battery','battery');
|
||||
if (%row || $show{'battery-forced'}){
|
||||
assign_data(%row);
|
||||
}
|
||||
}
|
||||
if ( $show{'ram'} ){
|
||||
set_dmi_data() if $b_dmi && !$b_dmi_check;
|
||||
$b_dmi_check = 1;
|
||||
set_dmi_data($b_dmi_check) if $b_dmi && !$b_dmi_check;
|
||||
%row = line_handler('Memory','ram');
|
||||
assign_data(%row);
|
||||
}
|
||||
if ( $show{'slot'} ){
|
||||
set_dmi_data() if $b_dmi && !$b_dmi_check;
|
||||
$b_dmi_check = 1;
|
||||
set_dmi_data($b_dmi_check) if $b_dmi && !$b_dmi_check;
|
||||
%row = line_handler('PCI Slots','slot');
|
||||
assign_data(%row);
|
||||
}
|
||||
if ( $show{'cpu'} || $show{'cpu-basic'} ){
|
||||
set_pci_data($b_pci_check) if $b_arm && !$b_pci_check;
|
||||
set_dmesg_boot_data() if ($bsd_type && !$b_dmesg_boot_check);
|
||||
my $arg = ($show{'cpu-basic'}) ? 'basic' : 'full' ;
|
||||
%row = line_handler('CPU','cpu',$arg);
|
||||
assign_data(%row);
|
||||
}
|
||||
if ( $show{'graphic'} ){
|
||||
set_pci_data() if !$b_pci_check;
|
||||
$b_pci_check = 1;
|
||||
set_pci_data($b_pci_check) if !$b_pci_check;
|
||||
%row = line_handler('Graphics','graphic');
|
||||
assign_data(%row);
|
||||
}
|
||||
if ( $show{'audio'} ){
|
||||
set_pci_data() if !$b_pci_check;
|
||||
set_pci_data($b_pci_check) if !$b_pci_check;
|
||||
$b_pci_check = 1;
|
||||
%row = line_handler('Audio','audio');
|
||||
assign_data(%row);
|
||||
}
|
||||
if ( $show{'network'} ){
|
||||
set_usb_data() if !$b_usb_check;
|
||||
set_pci_data() if !$b_pci_check;
|
||||
set_pci_data($b_pci_check) if !$b_pci_check;
|
||||
set_ip_data() if ($show{'ip'} || ($bsd_type && $show{'network-advanced'}));
|
||||
$b_pci_check = 1;
|
||||
$b_usb_check = 1;
|
||||
%row = line_handler('Network','network');
|
||||
assign_data(%row);
|
||||
}
|
||||
|
@ -17918,7 +17967,6 @@ sub generate_lines {
|
|||
set_usb_data() if !$b_usb_check;
|
||||
%row = line_handler('USB','usb');
|
||||
assign_data(%row);
|
||||
$b_usb_check = 1;
|
||||
}
|
||||
if ( $show{'sensor'} ){
|
||||
%row = line_handler('Sensors','sensor');
|
||||
|
|
2
inxi.1
2
inxi.1
|
@ -1,4 +1,4 @@
|
|||
.TH INXI 1 "2018\-07\-23" inxi "inxi manual"
|
||||
.TH INXI 1 "2018\-07\-30" inxi "inxi manual"
|
||||
.SH NAME
|
||||
inxi \- Command line system information script for console and IRC
|
||||
.SH SYNOPSIS
|
||||
|
|
|
@ -1,3 +1,47 @@
|
|||
=====================================================================================
|
||||
Version: 3.0.20
|
||||
Patch Version: 00
|
||||
Script Date: 2018-07-30
|
||||
-----------------------------------
|
||||
Changes:
|
||||
-----------------------------------
|
||||
New version, new man. ARM enhancements and updates, -S data ongoing enhancements.
|
||||
|
||||
Fixes:
|
||||
1. Added support for new ARM SOC types, including chromebook ARM. Note that so far I
|
||||
have been unable to find a way to detect MMC networking, at least in a meaningful
|
||||
way. I know where the data is, but I can't figure out how to reasonably integrate it
|
||||
into the main ARM soc/device generator logic because it's fundamentally different
|
||||
from most platform or devicetree data.
|
||||
2. Added alternate battery tests, this should cover a wide range of alternate
|
||||
battery IDs, while still preserving the distinction between system power batteries,
|
||||
and device batteries. The detection is now far more dynamic, and can handle
|
||||
unknown syntax for battery ID, while not losing the ability to correctly identify
|
||||
device batteries (like mice, keyboards, etc).
|
||||
3. Trying a somewhat unreliable hack to get cpu variant for arm devices where the
|
||||
current method fails. this may be removed if it causes false ID in the future.
|
||||
4. Excluded all /driver/ paths from ARM SOC @pci generation, those give read errors
|
||||
even as root.
|
||||
5. Fixed a few defective wm version detections.
|
||||
|
||||
Enhancements:
|
||||
The -S line continues to see many improvements.
|
||||
1. Greatly expanded the set of info: items, now it covers all the toolbars,
|
||||
panels, and docks that I could find, plus a few things like icewmtray, where the
|
||||
wm has a built in panel. While there are probably more bar/panel/dock tools out
|
||||
there, and more will get added if or when they are encountered, now info: shows
|
||||
far more variants than ever before, and covers the range of options simpler wm
|
||||
users have for bars, trays, and panels. If I missed one that is detectable, by
|
||||
all means show how to detect it!
|
||||
2. Fine tuned and added a few more window managers, and added version for some that
|
||||
were not showing versions.
|
||||
3. Added 3 more dm version handlers, slim, gdm, gdm3, and refactored that code to
|
||||
use the same program_values/program_version logic that the other tools use.
|
||||
4. A few more obscure and usb stick vendor IDs added.
|
||||
|
||||
-----------------------------------
|
||||
-- Harald Hope - Mon, 30 Jul 2018 18:06:11 -0700
|
||||
|
||||
=====================================================================================
|
||||
Version: 3.0.19
|
||||
Patch Version: 00
|
||||
|
|
Loading…
Reference in a new issue