Neofetch: Mac OS bugs (Incorrect resolution when Retina, Counting HT cores)

Created on 14 Oct 2016  路  15Comments  路  Source: dylanaraps/neofetch

Description

Found on /g/, not sure how valid this is as I can't test myself.

@iandrewt, can you take a look at this?

[Sat Sep 17] Neofetch gets resolution wrong on retina macbooks and counts HT cores as well, but then screenfetch gets used memory including buffers and doesn't count cores at all

/g/ scrot

Bug Mac OS

Most helpful comment

Okay so I've deduced from that screenshot that neofetch is actually printing the resolution correctly in my opinion. The 1680x1050 is the retina resolution, which is what the user experiences (@2x), and is rendered at 3360x2100 to be downscaled to the 2880x1800 panel. Maybe we should add something to indicate that it's a retina resolution.

Regarding hyper threading cores, this is an easy fix, and I can add an option to decide whether to print HT cores or not too.

All 15 comments

I've got a retina iMac I can test this on, I'll take a look this afternoon. It might be an issue with screenresolution but I can probably find a way around it

Okay so I've deduced from that screenshot that neofetch is actually printing the resolution correctly in my opinion. The 1680x1050 is the retina resolution, which is what the user experiences (@2x), and is rendered at 3360x2100 to be downscaled to the 2880x1800 panel. Maybe we should add something to indicate that it's a retina resolution.

Regarding hyper threading cores, this is an easy fix, and I can add an option to decide whether to print HT cores or not too.

Also, the reason Screenfetch prints 2880x1800 is because it only uses system_profiler which prints the panel resolution, not the current resolution, regardless of setting.

What changes do you suggest I make from this?

I'm happy with either of these, whatever is easiest to implement.

1680x1050 (2880x1800)
1680x1050@2x

What do you think?

I think the latter makes more sense, I'll do that when I get home. With the hyperthreading thing, should I add an option for that or just change it to be physical cores?

Change it to be physical cores.

Finding whether the current resolution is retina is harder than I thought it would be, I'll have to take a deeper look into this (and possibly write an alternative to screenresolution if I have to, I've found a way to get the scale factor and the rest of it with Obj-C but I can't convert that to bash)

What does this command output?

osascript -e 'tell application "Finder" to get bounds of window of desktop'

Reading this file might also give us some info related to retina.

defaults read /Library/Preferences/com.apple.windowserver.plist

Source: http://stackoverflow.com/questions/20099333/terminal-command-to-show-connected-displays-monitors-resolutions

On my non-retina MacBook, 0, 0, 1280, 800, on the retina iMac (native res is 5120x2880), 0, 0, 2560, 1440

Found the value in that file for if it's retina or not (Resolution = 2 on retina, 1 on non-retina), I'll work on the fix now

How can I insert the @2x text between the resolution and the refresh rate? I've got the detection working fine now

This should work:

resolution="${resolution// @/@2x @}"

Both issues have been fixed, thanks @iandrewt.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shawniac picture shawniac  路  4Comments

pelomedusa picture pelomedusa  路  4Comments

zoenglinghou picture zoenglinghou  路  6Comments

dylanaraps picture dylanaraps  路  8Comments

Monty picture Monty  路  4Comments