Merge pull request #366 from iandrewt/retina-fix
macOS: add @2x label for retina resolutions
This commit is contained in:
commit
d0c67878fe
1 changed files with 5 additions and 0 deletions
5
neofetch
5
neofetch
|
@ -1324,6 +1324,11 @@ getresolution() {
|
||||||
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
|
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
scale_factor="$(/usr/libexec/PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" /Library/Preferences/com.apple.windowserver.plist)"
|
||||||
|
|
||||||
|
[ "${scale_factor%.*}" == "2" ] && \
|
||||||
|
resolution="${resolution// @/@2x @}"
|
||||||
|
|
||||||
if [ "$refresh_rate" == "off" ]; then
|
if [ "$refresh_rate" == "off" ]; then
|
||||||
resolution="${resolution// @ [0-9][0-9]Hz}"
|
resolution="${resolution// @ [0-9][0-9]Hz}"
|
||||||
resolution="${resolution// @ [0-9][0-9][0-9]Hz}"
|
resolution="${resolution// @ [0-9][0-9][0-9]Hz}"
|
||||||
|
|
Loading…
Reference in a new issue