KittyKatt / screenFetch

Fetches system/theme information in terminal for Linux desktop screenshots.
GNU General Public License v3.0
3.86k stars 455 forks source link

os shows abnormal in mac osx #766

Open marslojiao-mvl opened 1 year ago

marslojiao-mvl commented 1 year ago

I'm submitting a bug report

[ x] bug report
[ ] new distro request

Bug report


                 -/+:.          marslo@iMarslo
                :++++.          OS: 64bit Mac OS X  13.3.1
ProductVersionExtra:    (a)     22E772610a
               /+++/.           Kernel: x86_64 Darwin 22.4.0
       .:-::- .+/:-``.::-       Uptime: 2h 59m
    .:/++++++/::::/++++++/:`    Packages: 373
  .:///////////////////////:`   Shell: bash 5.2.15
  ////////////////////////`     Resolution: 2880x1800
 -+++++++++++++++++++++++`      DE: Aqua
 /++++++++++++++++++++++/       WM: Quartz Compositor
 /sssssssssssssssssssssss.      WM Theme: Graphite (Dark)
 :ssssssssssssssssssssssss-     Font: ComicMono 26.5
  osssssssssssssssssssssssso/`  Disk: 193G / 251G (77%)
  `syyyyyyyyyyyyyyyyyyyyyyyy+`  CPU: Intel Core i7-8750H @ 2.20GHz
   `ossssssssssssssssssssss/    GPU: Intel UHD Graphics 630 / Radeon Pro 555X
     :ooooooooooooooooooo+.     RAM: 9187MiB / 16384MiB
      `:+oo+/:-..-:/+o+/-

issue comes from ProductVersionExtra in sw_ver

$ sw_vers | grep 'ProductVersion'
ProductVersion:     13.3.1
ProductVersionExtra:    (a)

details:

screenfetch-osx-os-issue
marslo commented 1 year ago

hmm... I've noticed the latest screenfetch-dev using better solution to show ProductionVesion and BuildVersion via

$ sw_vers --productVersion
13.3.1
$ sw_vers --buildVersion
22E772610a

However, the version was cut off. here are pull request: https://github.com/KittyKatt/screenFetch/pull/767

cheng470 commented 1 year ago

hmm... I've noticed the latest screenfetch-dev using better solution to show ProductionVesion and BuildVersion via

$ sw_vers --productVersion
13.3.1
$ sw_vers --buildVersion
22E772610a

However, the version was cut off. here are pull request: #767

The syntax of the sw_vers command is not quite the same as yours :

$ sw_vers --productVersion
Usage: sw_vers [-productName|-productVersion|-buildVersion]
$ sw_vers -productVersion 
12.6.8
$ sw_vers -buildVersion  
21G725

I had to modify the script to fit my MacOS.

Below way is more safe:

$ sw_vers | grep -i productversion | awk '{print $2}'
12.6.8