diff --git a/pinxi b/pinxi index ffa9261..e47d883 100755 --- a/pinxi +++ b/pinxi @@ -50,8 +50,8 @@ use POSIX qw(ceil uname strftime ttyname); ## INXI INFO ## my $self_name='pinxi'; my $self_version='3.3.31'; -my $self_date='2023-11-22'; -my $self_patch='16'; +my $self_date='2023-11-26'; +my $self_patch='17'; ## END INXI INFO ## my ($b_pledge,@pledges); @@ -2866,6 +2866,11 @@ sub error_handler { $errno=21; "Option: '$one' feature: '$two' has not been implemented yet." } elsif ($err eq 'unknown-option'){ $errno=22; $b_help=1; "Unsupported option: $one" } + elsif ($err eq 'option-deprecated'){ + $errno=23; $b_exit=0; + "The option: $one has been deprecated. Please use $two instead." } + elsif ($err eq 'option-removed'){ + $errno=24; $b_help=1; "The option: $one has been remnoved. Please use $two instead." } ## Data elsif ($err eq 'open-data'){ $errno=32; "Error opening data for reading: $one \nError: $two" } @@ -2926,7 +2931,7 @@ sub error_handler { }; print_line("Error $errno: $message\n"); if ($b_help){ - print_line("Check -h for correct parameters.\n"); + print_line("Check -h for correct useage.\n"); } if ($b_recommends){ print_line("See --recommends for more information.\n"); @@ -4874,10 +4879,7 @@ sub get { $show{'swap'} = 1; $show{'system'} = 1;}, 'gpu|nvidia|nv' => sub { - $b_admin = 1; - $show{'short'} = 0; - $show{'graphic'} = 1; - $show{'graphic-full'} = 1;}, + main::error_handler('option-removed', '--gpu/--nvidia/--nv','-Ga');}, 'G|graphics|graphic' => sub { $show{'short'} = 0; $show{'graphic'} = 1; @@ -4890,7 +4892,7 @@ sub get { $show{'ip'} = 1; $show{'network'} = 1; $show{'network-advanced'} = 1; - $use{'downloader'} = 1 if ! main::check_program('dig');}, + $use{'downloader'} = 1 if !main::check_program('dig');}, 'I|info' => sub { $show{'short'} = 0; $show{'info'} = 1;}, @@ -5085,38 +5087,32 @@ sub get { else { main::error_handler('bad-arg',$opt,$arg); }}, - 'V|version' => sub { + 'V' => sub { + main::error_handler('option-deprecated', '-V','--version/--vf'); + $show{'version'} = 1;}, + 'version|vf' => sub { $show{'version'} = 1;}, 'version-short|vs' => sub { $show{'version-short'} = 1;}, - 'w|weather' => sub { - my ($opt) = @_; - $show{'short'} = 0; - $use{'downloader'} = 1; - if ($use{'weather'}){ - $show{'weather'} = 1; - } - else { - main::error_handler('distro-block', $opt); - }}, - 'W|weather-location:s' => sub { + 'w|weather:s' => sub { my ($opt,$arg) = @_; - $arg ||= ''; - $arg =~ s/\s//g; $show{'short'} = 0; $use{'downloader'} = 1; if ($use{'weather'}){ + $arg =~ s/\s//g if $arg; if ($arg){ $show{'weather'} = 1; $show{'weather-location'} = $arg; } else { - main::error_handler('bad-arg',$opt,$arg); + $show{'weather'} = 1; } } else { main::error_handler('distro-block', $opt); }}, + 'W|weather-location:s' => sub { + main::error_handler('option-removed', '-W','-w/--weather [location]');}, 'ws|weather-source:s' => sub { my ($opt,$arg) = @_; # let api processor handle checks if valid, this @@ -5127,7 +5123,7 @@ sub get { else { main::error_handler('bad-arg',$opt,$arg); }}, - 'weather-unit:s' => sub { + 'weather-unit|wu:s' => sub { my ($opt,$arg) = @_; $arg ||= ''; $arg =~ s/\s//g; @@ -5781,10 +5777,10 @@ sub show_options { it will display a short system summary."], ['0', '', '', ''], ['0', '', '', "You can use these options alone or together, - to show or add the item(s) you want to see: A, B, C, D, E, G, I, J, L, M, N, - P, R, S, W, d, f, i, j, l, m, n, o, p, r, s, t, u, w, --edid, --slots. - If you use them with -v [level], -b or -F, $self_name will add the requested - lines to the output."], + to show or add the item(s) you want to see: A, B, C, d, D, E, f, G, i, I, j, + J, l, L, m, M, n, N, o, p, P, r, R, s, S, t, u, w, --edid, --mm, --ms, + --slots. If you use them with -v [level], -b or -F, $self_name will add the + requested lines to the output."], ['0', '', '', '' ], ['0', '', '', "Examples:^$self_name^-v4^-c6 OR $self_name^-bDc^6 OR $self_name^-FzjJxy^80"], @@ -5816,7 +5812,6 @@ sub show_options { ['1', '-F', '--full', "Full output. Includes all Upper Case line letters (except -J, -W) plus --swap, -s and -n. Does not show extra verbose options such as -d -f -i -J -l -m -o -p -r -t -u -x, unless specified."], - ['1', '', '--gpu', "Deprecated. Triggers -Ga."], ['1', '-G', '--graphics', "Graphics info (devices(s), drivers, display protocol (if available), display server/Wayland compositor, resolution, X.org: renderer, basic EGL, OpenGL, Vulkan API data; Xvesa API: VBE info."], @@ -5902,18 +5897,19 @@ sub show_options { # if distro maintainers don't want the weather feature disable it if ($use{'weather'}){ push(@$rows, - ['1', '-w', '--weather', "Local weather data/time. To check an alternate - location, see -W. NO AUTOMATED QUERIES OR EXCESSIVE USE ALLOWED!"], - ['1', '-W', '--weather-location', "[location] Supported options for - [location]: postal code[,country/country code]; city, state (USA)/country + ['1', '-w', '--weather', "NO^AUTOMATED^QUERIES^OR^EXCESSIVE^USE^ALLOWED!"], + ['1', '', '', "Without [location]: Your current local (local to + your IP address) weather data/time.Example:^$self_name^-w"], + ['1', '', '', "With [location]: Supported location options are: + postal code[,country/country code]; city, state (USA)/country (country/two character country code); latitude, longitude. Only use if you want the weather somewhere other than the machine running $self_name. Use only ASCII characters, replace spaces in city/state/country names with '+'. - Example:^$self_name^-W^[new+york,ny^london,gb^madrid,es]"], - ['1', '', '--weather-source', "[1-9] Change weather data source. 1-4 + Example:^$self_name^-w^[new+york,ny^london,gb^madrid,es]"], + ['1', '', '--weather-source,--ws', "[1-9] Change weather data source. 1-4 generally active, 5-9 check. See man."], - ['1', '', '--weather-unit', "Set weather units to metric (m), imperial (i), - metric/imperial (mi), or imperial/metric (im)."], + ['1', '', '--weather-unit,--wu', "Set weather units to metric (m), imperial + (i), metric/imperial (mi), or imperial/metric (im)."], ); } push(@$rows, @@ -6009,7 +6005,7 @@ sub show_options { ['2', '-j', '', "Add mapped: name if partition mapped."], ['2', '-J', '', "For Device: driver; Si speed (base 10, bits/s)."], ['2', '-L', '', "For VG > LV, and other Devices, dm:"], - ['2', '-m,--memory-modules', '', "Max memory module size (if available)."], + ['2', '-m,--mm', '', "Max memory module size (if available)."], ['2', '-N', '', "Specific vendor/product information (if relevant); PCI/USB ID of device; Version/port(s)/driver version (if available); device temperature (Linux, if found)."], @@ -6028,8 +6024,8 @@ sub show_options { ); if ($use{'weather'}){ push(@$rows, - ['2', '-w,-W', '', "Wind speed and direction, humidity, pressure, - and time zone, if available."]); + ['2', '-w', '', "Wind speed and direction, humidity, pressure, and time + zone, if available."]); } push(@$rows, ['0', '', '', ''], @@ -6062,7 +6058,7 @@ sub show_options { ['2', '-L', '', "Show internal LVM volumes, like raid image/meta volumes; for LVM RAID, adds RAID report line (if not -R); show all components > devices, number of 'c' or 'p' indicate depth of device."], - ['2', '-m,--memory-modules', '', "Manufacturer, part number; single/double + ['2', '-m,--mm', '', "Manufacturer, part number; single/double bank (if found); memory array voltage (legacy, rare); module voltage (if available)."], ['2', '-M', '', "Chassis info, BIOS ROM size (dmidecode only), if available."], @@ -6079,8 +6075,8 @@ sub show_options { ); if ($use{'weather'}){ push(@$rows, - ['2', '-w,-W', '', "Snow, rain, precipitation, (last observed hour), - cloud cover, wind chill, dew point, heat index, if available."] + ['2', '-w', '', "Snow, rain, precipitation, (last observed hour), cloud + cover, wind chill, dew point, heat index, if available."] ); } push(@$rows, @@ -6104,7 +6100,7 @@ sub show_options { session."], ['2', '-J', '', "If present: Devices: serial number, interface count, max power."], - ['2', '-m,--memory-modules', '', "Width of memory bus, data and total (if + ['2', '-m,--mm', '', "Width of memory bus, data and total (if present and greater than data); Detail for Type, if present; module current, min, max voltages (if present and different from each other); serial number."], ['2', '-N', '', "Serial number, class ID."], @@ -6118,8 +6114,8 @@ sub show_options { ); if ($use{'weather'}){ push(@$rows, - ['2', '-w,-W', '', "Location (uses -z/irc filter), weather observation - time, altitude, sunrise/sunset, if available."] + ['2', '-w', '', "Location (uses -z/irc filter), weather observation time, + altitude, sunrise/sunset, if available."] ); } push(@$rows, @@ -6189,16 +6185,16 @@ sub show_options { otherwise user is fine. Man page installs require root. No arguments downloads from main $self_name git repo."], ['1', '', '', "Use alternate sources for updating $self_name"], - ['3', '3', '', "Get the dev server (smxi.org) version."], - ['3', '4', '', "Get the dev server (smxi.org) FTP version. Use if SSL issues + ['2', '3', '', "Get the dev server (smxi.org) version."], + ['2', '4', '', "Get the dev server (smxi.org) FTP version. Use if SSL issues and --no-ssl doesn't work."], - ['2', '', '', "Get a version of $self_name from your own + ['2', '[http|https|ftp]', '', "Get a version of $self_name from your own server. Use the full download path, e.g. - ^$self_name^-U ^https://myserver.com/inxi"], + ^$self_name^-U^https://myserver.com/inxi"], ); } push(@$rows, - ['1', '-V', '--version', "Prints full $self_name version info then exits."], + ['1', '', '--version, --vf', "Prints full $self_name version info then exits."], ['1', '', '--version-short,--vs', "Prints 1 line $self_name version info. Can be used with other line options."], ['0', '', '', "$line"], @@ -34297,12 +34293,13 @@ sub get_pcie_data { eval $end if $b_log; } -## PowerData +## PowerData - get +# No BSD support currently. Test by !$bsd_type. Should any BSD data source +# appear, make bsd_data() and add $bsd_type switch here, remove from caller. { package PowerData; my $power = {}; -# No BSD support currently. Test by !$bsd_type. # args: 0: $power by ref sub get { eval $start if $b_log; @@ -34311,7 +34308,6 @@ sub get { return $power; } -# note: currently Linux only, if we ever find BSD sources, take another look. sub sys_data { eval $start if $b_log; # Some systems also report > 1 wakeup events per wakeup with diff --git a/pinxi.1 b/pinxi.1 index 347a801..a0ecfde 100644 --- a/pinxi.1 +++ b/pinxi.1 @@ -15,7 +15,7 @@ .\" with this program; if not, write to the Free Software Foundation, Inc., .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. .\" -.TH INXI 1 "2023\-11\-22" "inxi" "inxi manual" +.TH INXI 1 "2023\-11\-26" "inxi" "inxi manual" .SH NAME inxi \- Command line system information script for console and IRC @@ -23,17 +23,17 @@ inxi \- Command line system information script for console and IRC .SH SYNOPSIS \fBinxi\fR -\fBinxi\fR [\fB\-AbBCdDEfFGhiIjJlLmMnNopPrRsSuUVwyYzZ\fR] +\fBinxi\fR [\fB\-AbBCdDEfFGhiIjJlLmMnNopPrRsSuUwyYzZ\fR] \fBinxi\fR [\fB\-c -NUMBER\fR] [\fB\-\-sensors\-exclude SENSORS\fR] [\fB\-\-sensors\-use SENSORS\fR] [\fB\-t\fR [\fBc\fR|\fBm\fR|\fBcm\fR|\fBmc\fR][\fBNUMBER\fR]] -[\fB\-v NUMBER\fR] [\fB\-W LOCATION\fR] +[\fB\-v NUMBER\fR] [\fB\-w [LOCATION]\fR] [\fB\-\-weather\-unit\fR {\fBm\fR|\fBi\fR|\fBmi\fR|\fBim\fR}] [\fB\-y WIDTH\fR] \fBinxi\fR [\fB\-\-edid\fR] [\fB\-\-memory\-modules\fR] [\fB\-\-memory\-short\fR] [\fB\-\-recommends\fR] [\fB\-\-sensors\-default\fR] -[\fB\-\-slots\fR] +[\fB\-\-slots\fR] [\fB\-\-version\fR] [\fB\-\-version\-short\fR] \fBinxi\fB [\fB\-x\fR|\fB\-xx\fR|\fB\-xxx\fR|\fB\-a\fR] \fB\-OPTION(s)\fR @@ -327,14 +327,9 @@ in order to avoid spamming. ARM CPUs: show \fBfeatures\fR items. .TP .B \-F \fR, \fB\-\-full\fR Show Full output for inxi. Includes all Upper Case line letters (except -\fB\-J\fR and \fB\-W\fR) plus \fB\-\-swap\fR, \fB\-s\fR and \fB\-n\fR. Does not -show extra verbose options such as \fB\-d \-f \-i -J \-l \-m \-o \-p \-r \-t \-u -\-x\fR unless you use those arguments in the command, e.g.: -\fBinxi \-Frmxx\fR - -.TP -.B \-\-gpu\fR -Deprecated. See \fB\-G \-a\fR. +\fB\-J\fR, plus \fB\-\-swap\fR, \fB\-s\fR and \fB\-n\fR. Does not show extra +verbose options such as \fB\-d \-f \-i -J \-l \-m \-o \-p \-r \-t \-u \-x\fR +unless you use those arguments in the command, e.g.: \fBinxi \-Frmxx\fR .TP .B \-G \fR, \fB\-\-graphics\fR @@ -645,11 +640,6 @@ Show Advanced Network device information in addition to that produced by .B \-N \fR, \fB\-\-network\fR Show Network device(s) information, including device driver. With \fB\-x\fR, shows Bus ID, Port number. - -.TP -.B \-\-nvidia\fR, \fB\-\-nv\fR -.br -Deprecated. See \fB\-Ga\fR. .TP .B \-o \fR, \fB\-\-unmounted\fR @@ -866,7 +856,7 @@ straight FTP to get the file from smxi.org server. [http|https|ftp] \- Get a version of $self_name from your own server. Use the full download path, e.g. -\fB\inxi -U ^https://myserver.com/inxi\fR +\fB\inxi -U https://myserver.com/inxi\fR For failed downloads, use the debug option \fB\-\-dbg 1\fR in addition to get more verbose failure reports. @@ -876,16 +866,6 @@ more verbose failure reports. .br See \fB\-J\fR. -.TP -.B \-V\fR, \fB\-\-version\fR -inxi full version and license information. Prints information then exits. - -.TP -.B \-\-version\-short\fR, \fB\-\-vs\fR -inxi single line version information. Prints information if not short form -(which shows version info already). Does not exit unless used without any other -options. Can be used with normal line options. - .TP .B \-v \fR, \fB\-\-verbosity\fR Script verbosity levels. If no verbosity level number is given, 0 is assumed. @@ -944,49 +924,53 @@ of optical drives. from your system. .TP -.B \-w \fR, \fB\-\-weather\fR -Adds weather line. To get weather for an alternate location, use \fB\-W -[location]\fR. See also \fB\-x\fR, \fB\-xx\fR, \fB\-xxx\fR options. Please note -that your distribution's maintainer may chose to disable this feature. +.B \-\-version\fR, \fB\-\-vf\fR +inxi full version and license information. Prints information then exits. +.TP +.B \-\-version\-short\fR, \fB\-\-vs\fR +inxi single line version information. Prints information if not short form +(which shows version info already). Does not exit unless used without any other +options. Can be used with normal line options, and prints version info line as +first line of output. + +.TP +.B \-w \fR, \fB\-\-weather [location]\fR DO NOT USE THIS FEATURE FOR AUTOMATED WEATHER UPDATES! Automated or excessive use will lead to your being blocked from any further access. This feature is not meant for widget type weather monitoring, or Conky type use. It is meant to get weather when you need to see it, for example, on a remote server. If you did not type the weather option in manually, it's an automated request. -.TP -.B \-W\fR, \fB\-\-weather\-location [location_string]\fR -Get weather/time for an alternate location. Accepts postal/zip code[, country], -city,state pair, or latitude,longitude. Note: city/country/state names must -not contain spaces. Replace spaces with '\fB+\fR' sign. Don't place spaces -around any commas. Postal code is not reliable except for North America and -maybe the UK. Try postal codes with and without country code added. Note that -City,State applies only to USA, otherwise it's City,Country. If country name -(english) does not work, try 2 character country code (e.g. Spain: es; -Great Britain: gb). +Adds weather line for your current location (by IP address) if no location +requested. To get weather for an alternate location, add \fB[location]\fR. See +also \fB\-x\fR, \fB\-xx\fR, \fB\-xxx\fR options. Please note that your +distribution's maintainer may chose to disable this feature. + +With optional \fB[location]\fR \- get weather/time for an alternate location. +Accepts postal/zip code[, country], city,state pair, or latitude,longitude. +Note: city/country/state names must not contain spaces. Replace spaces with +the '\fB+\fR' sign. Don't place spaces around any commas. Postal code is not +reliable except for North America and maybe the UK. Try postal codes with and +without country code added. Note that City,State applies only to USA, otherwise +it's City,Country. If country name (english) does not work, try 2 character +country code (e.g. Spain: es; Great Britain: gb). See \fIhttps://en.wikipedia.org/wiki/ISO_3166\-1_alpha\-2\fR for current 2 letter country codes. Use only ASCII letters in city/state/country names. -Examples: \fB\-W 95623,us\fR OR \fB\-W Boston,MA\fR OR -\fB\-W 45.5234,\-122.6762\fR OR \fB\-W new+york,ny\fR OR \fB\-W bodo,norway\fR. - -DO NOT USE THIS FEATURE FOR AUTOMATED WEATHER UPDATES! Automated or excessive -use will lead to your being blocked from any further access. This feature is not -meant for widget type weather monitoring, or Conky type use. It is meant to get -weather when you need to see it, for example, on a remote server. If you did not -type the weather option in manually, it's an automated request. +Examples: \fB\-w\fR OR \fB\-w 95623,us\fR OR \fB\-w Boston,MA\fR OR +\fB\-w 45.5234,\-122.6762\fR OR \fB\-w new+york,ny\fR OR \fB\-w bodo,norway\fR. .TP -.B \-\-weather\-source\fR, \fB\-\-ws [unit]\fR +.B \-\-weather\-source\fR, \fB\-\-ws [source-id]\fR [\fB1\-9\fR] Switches weather data source. Possible values are \fB1\-9\fR. \fB1\-4\fR will generally be active, and \fB5\-9\fR may or may not be active, so check. \fB1\fR may not support city / country names with spaces (even if you use the \fB+\fR sign instead of space). \fB2\fR offers pretty good data, -but may not have all small city names for \fB\-W\fR. +but may not have all small city names for \fB\-w location\fR. Please note that the data sources are not static per value, and can change any time, or be removed, so always test to verify which source is being used for @@ -995,7 +979,7 @@ on occasions, so try each one and see which you prefer. If you get unsupported source message, it means that number has not been implemented. .TP -.B \-\-weather\-unit [unit]\fR +.B \-\-weather\-unit\fR, \fB\-\-wu [unit]\fR [\fBm\fR|\fBi\fR|\fBmi\fR|\fBim\fR] Sets weather units to metric (\fBm\fR), imperial (\fBi\fR), metric (imperial) (\fBmi\fR, default), imperial (metric) (\fBim\fR). If metric or imperial not found,sets to default value, or \fBN/A\fR. @@ -1074,7 +1058,7 @@ The following options allow for modifying the output in various ways. Set color scheme. If no scheme number is supplied, 0 is assumed. .TP -.B \-c \fR[\fB94\fR\-\fB99\fR] +.B \-c \fR [\fB94\fR\-\fB99\fR] These color selectors run a color selector option prior to inxi starting which lets you set the config file value for the selection. @@ -1531,7 +1515,7 @@ found for each distribution system base detection. (\fB\-xt m\fR). .TP -.B \-x \-w \fR, \fB\-W\fR +.B \-x \-w\fR \- Adds humidity and barometric pressure. \- Adds wind speed and direction. @@ -1800,7 +1784,7 @@ running. If none found, shows nothing. Uses a less accurate fallback tool \- Adds slot voltage, if available. .TP -.B \-xx \-w \fR, \fB\-W\fR +.B \-xx \-w\fR \- Adds wind chill, heat index, and dew point, if available. \- Adds cloud cover, rain, snow, or precipitation (amount in previous hour @@ -1973,7 +1957,7 @@ are just programs called by other tools or actions. \- Adds (if present), display manager (\fBdm\fR) version number. .TP -.B \-xxx \-w \fR, \fB\-W\fR +.B \-xxx \-w \fR \- Adds location (city state country), observation altitude (if available), weather observation time (if available), sunset/sunrise (if available). @@ -2688,10 +2672,10 @@ behavior. .TP .B \-\-no\-ssl\fR -Skip SSL certificate checks for all downloader actions (\fB\-U\fR, \fB\-w\fR, -\fB\-W\fR, \fB\-i\fR). Use if your system does not have current SSL certificate -lists, or if you have problems making a connection for any reason. Works with -\fBWget\fR, \fBCurl\fR, \fBPerl HTTP::Tiny\fR and \fBFetch\fR. +Skip SSL certificate checks for all downloader actions (\fB\-U\fR, \fB\-w\fR, +\fB\-i\fR). Use if your system does not have current SSL certificate lists, or +if you have problems making a connection for any reason. Works with \fBWget\fR, +\fBCurl\fR, \fBPerl HTTP::Tiny\fR and \fBFetch\fR. .TP .B \-\-no\-sudo\fR