mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
-I row redo
This commit is contained in:
parent
d2af8a2de1
commit
80cfab71f1
65
pinxi
65
pinxi
|
@ -50,8 +50,8 @@ use POSIX qw(ceil uname strftime ttyname);
|
||||||
## INXI INFO ##
|
## INXI INFO ##
|
||||||
my $self_name='pinxi';
|
my $self_name='pinxi';
|
||||||
my $self_version='3.3.31';
|
my $self_version='3.3.31';
|
||||||
my $self_date='2023-11-18';
|
my $self_date='2023-11-20';
|
||||||
my $self_patch='12';
|
my $self_patch='13';
|
||||||
## END INXI INFO ##
|
## END INXI INFO ##
|
||||||
|
|
||||||
my ($b_pledge,@pledges);
|
my ($b_pledge,@pledges);
|
||||||
|
@ -7402,7 +7402,7 @@ sub print_data {
|
||||||
}
|
}
|
||||||
$start_holder = $key;
|
$start_holder = $key;
|
||||||
$indent_2 = $indent + $size{'indents'};
|
$indent_2 = $indent + $size{'indents'};
|
||||||
$b_ni2 = ($start_holder eq 'Info') ? 1 : 0;
|
$b_ni2 = 0; # ($start_holder eq 'Info') ? 1 : 0;
|
||||||
if ($indent < 10){
|
if ($indent < 10){
|
||||||
$line = "$start\n";
|
$line = "$start\n";
|
||||||
print_line($line);
|
print_line($line);
|
||||||
|
@ -36481,33 +36481,32 @@ sub short_output {
|
||||||
sub info_item {
|
sub info_item {
|
||||||
eval $start if $b_log;
|
eval $start if $b_log;
|
||||||
my $num = 0;
|
my $num = 0;
|
||||||
my $gcc_alt = '';
|
|
||||||
my $running_in = '';
|
my $running_in = '';
|
||||||
my $data_name = main::key($prefix++,1,0,'Info');
|
my $data_name = main::key($prefix++,1,0,'Info');
|
||||||
my ($b_gcc,$gcc,$index);
|
my ($index);
|
||||||
my ($available,$gpu_ram,$parent,$percent,$used) = ('',0,'','','');
|
my ($available,$gpu_ram,$parent,$percent,$used) = ('',0,'','','');
|
||||||
my $gccs = main::get_gcc_data();
|
|
||||||
if (@$gccs){
|
|
||||||
$gcc = shift @$gccs;
|
|
||||||
if ($extra > 1 && @$gccs){
|
|
||||||
$gcc_alt = join('/', @$gccs);
|
|
||||||
}
|
|
||||||
$b_gcc = 1;
|
|
||||||
$gcc ||= 'N/A'; # should not be needed after fix but leave in case undef
|
|
||||||
}
|
|
||||||
my $data = {
|
my $data = {
|
||||||
$data_name => [{
|
$data_name => [{}],
|
||||||
main::key($num++,0,1,'Processes') => scalar @ps_aux,
|
|
||||||
main::key($num++,1,1,'Uptime') => main::get_uptime(),
|
|
||||||
},],
|
|
||||||
};
|
};
|
||||||
$index = scalar(@{$data->{$data_name}}) - 1;
|
$index = 0;
|
||||||
|
if (!$loaded{'memory'}){
|
||||||
|
main::MemoryData::row('info',$data->{$data_name}[$index],\$num,1);
|
||||||
|
}
|
||||||
|
$index++;
|
||||||
|
$data->{$data_name}[$index]{main::key($num++,0,1,'Processes')} = scalar @ps_aux;
|
||||||
|
$data->{$data_name}[$index]{main::key($num++,1,1,'Uptime')} = main::get_uptime();
|
||||||
|
# $data = {
|
||||||
|
# $data_name => [{
|
||||||
|
# main::key($num++,0,1,'Processes') => scalar @ps_aux,
|
||||||
|
# main::key($num++,1,1,'Uptime') => main::get_uptime(),
|
||||||
|
# },],
|
||||||
|
# };
|
||||||
|
# $index = scalar(@{$data->{$data_name}});
|
||||||
if ($extra > 2){
|
if ($extra > 2){
|
||||||
my $wakeups = main::get_wakeups();
|
my $wakeups = main::get_wakeups();
|
||||||
$data->{$data_name}[$index]{main::key($num++,0,2,'wakeups')} = $wakeups if defined $wakeups;
|
$data->{$data_name}[$index]{main::key($num++,0,2,'wakeups')} = $wakeups if defined $wakeups;
|
||||||
}
|
}
|
||||||
if (!$loaded{'memory'}){
|
if (!$loaded{'memory'}){
|
||||||
my $row = {};
|
|
||||||
main::MemoryData::row('info',$data->{$data_name}[$index],\$num,1);
|
main::MemoryData::row('info',$data->{$data_name}[$index],\$num,1);
|
||||||
}
|
}
|
||||||
if ($gpu_ram){
|
if ($gpu_ram){
|
||||||
|
@ -36541,8 +36540,25 @@ sub info_item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$index++ if $extra > 0;
|
||||||
|
if ($extra > 0 && !$loaded{'package-data'}){
|
||||||
|
my $packages = PackageData::get('inner',\$num);
|
||||||
|
|
||||||
|
for (keys %$packages){
|
||||||
|
$data->{$data_name}[$index]{$_} = $packages->{$_};
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($extra > 0){
|
if ($extra > 0){
|
||||||
my $b_clang;
|
my ($b_clang,$b_gcc,$gcc,$gcc_alt);
|
||||||
|
my $gccs = main::get_gcc_data();
|
||||||
|
if (@$gccs){
|
||||||
|
$gcc = shift @$gccs;
|
||||||
|
if ($extra > 1 && @$gccs){
|
||||||
|
$gcc_alt = join('/', @$gccs);
|
||||||
|
}
|
||||||
|
$b_gcc = 1;
|
||||||
|
$gcc ||= 'N/A'; # should not be needed after fix but leave in case undef
|
||||||
|
}
|
||||||
my $clang_version = '';
|
my $clang_version = '';
|
||||||
if (my $path = main::check_program('clang')){
|
if (my $path = main::check_program('clang')){
|
||||||
$clang_version = main::program_version($path,'clang',3,'--version');
|
$clang_version = main::program_version($path,'clang',3,'--version');
|
||||||
|
@ -36561,12 +36577,7 @@ sub info_item {
|
||||||
$data->{$data_name}[$index]{main::key($num++,0,2,'clang')} = $clang_version;
|
$data->{$data_name}[$index]{main::key($num++,0,2,'clang')} = $clang_version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($extra > 0 && !$loaded{'package-data'}){
|
# $index++ if $extra > 1 && !$loaded{'shell-data'};
|
||||||
my $packages = PackageData::get('inner',\$num);
|
|
||||||
for (keys %$packages){
|
|
||||||
$data->{$data_name}[$index]{$_} = $packages->{$_};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$loaded{'shell-data'} && $ppid && (!$b_irc || !$client{'name-print'})){
|
if (!$loaded{'shell-data'} && $ppid && (!$b_irc || !$client{'name-print'})){
|
||||||
ShellData::set();
|
ShellData::set();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue