KittyKatt / screenFetch

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

Screenfetch does not work as expected on macos Big Sur 11.0.1 #692

Closed ridhwaans closed 3 months ago

ridhwaans commented 3 years ago

I'm submitting a ... (check one with "x")

[ x] bug report

image

On macos Big Sur version 11.0.1, see screenshot for errors
Previously on Catalina before upgrading, screenfetch used to print a multi colored apple logo ascii art,
print 64bit Mac OS X 10.15, x86_64 Darwin along with correct information about shell, resolution, gpu, ram, uptime etc

marslo commented 3 years ago

solution:

due to the output from /usr/bin/sw_vers was changed as:

$ /usr/bin/sw_vers
ProductName:    macOS
ProductVersion: 11.0.1
BuildVersion:   20B29

So, the issue can be manual fixed by modify Line 1057:

                    if [[ -x /usr/bin/sw_vers ]] && /usr/bin/sw_vers | grep -E '\s*[mM]ac\s*OS\s*X?' >/dev/null; then
                        distro="Mac OS X"

By using grep -E '\s*[mM]ac\s*OS\s*X?' instead of grep -i 'Mac OS X'

to match both Mac OS X or macOS in lower or higher version.

example:

Screen Shot 2020-11-13 at 5 05 24 PM
ridhwaans commented 3 years ago

@marslo please make a PR

donn commented 3 years ago

There's a PR right here: https://github.com/KittyKatt/screenFetch/pull/681/commits/f7200af70c527ec01133eef501cab3dbae51688a

arian81 commented 3 years ago

I still have that problem on a M1 Mac. I used the latest source code from Github.

Svartingknas commented 3 years ago

Hello Is there a timeline for the resolution of this issue? Running a macbook pro 2019 and reinstalled using brew. Thanks

darealshinji commented 3 years ago

It was fixed here: https://github.com/KittyKatt/screenFetch/commit/f7200af70c527ec01133eef501cab3dbae51688a

pgoggijr commented 3 years ago

it's fixed in master, but there hasn't been a release cut with this change

marcus-gomes-v commented 2 years ago

I still have that problem on a M1 Mac. I used the latest source code from Github.

I try now and its very easy man, just go this way;

This work for me in M1

$ sudo vim /opt/homebrew/Cellar/screenfetch/3.9.1/bin/screenfetch

This work for me in Intel chip

$ sudo vim /usr/local/Cellar/screenfetch/3.9.1/bin/screenfetch

Just diff installation directory of homebrew packages

Then go to the line 1057: like @marslo told and replace the line

if [[ -x /usr/bin/sw_vers ]] && /usr/bin/sw_vers | grep -E '\s*[mM]ac\s*OS\s*X?' >/dev/null; then
                        distro="Mac OS X"

Restart your terminal and done!

johnpekcan commented 1 year ago

Can confirm, fixed it for me as well. Thank you @marslo . Can we cut a new release @KittyKatt ?

KittyKatt commented 1 year ago

Yes, might need to be in a couple of days if that's okay?

johnpekcan commented 1 year ago

Yup yup, we can most certainly handle that 😇 , thank you @KittyKatt !

cmirza commented 1 year ago

Please add this to the next release. Thank you.

WRyan78 commented 1 year ago

replacing that line of code worked for me viniciusgomes , thank you

cglong commented 1 year ago

If you've installed screenFetch via Homebrew, you can go ahead and get the fix with --HEAD:

brew install --HEAD screenfetch