macOS: add @2x label for retina resolutions
This commit is contained in:
parent
6ed294e94d
commit
6f004a244f
6
neofetch
6
neofetch
|
@ -1324,6 +1324,12 @@ getresolution() {
|
|||
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
|
||||
fi
|
||||
|
||||
scale_factor="$(/usr/libexec/PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" /Library/Preferences/com.apple.windowserver.plist)"
|
||||
|
||||
if [ "${scale_factor%.*}" == "1" ]; then
|
||||
resolution="${resolution// @/@2x @}"
|
||||
fi
|
||||
|
||||
if [ "$refresh_rate" == "off" ]; then
|
||||
resolution="${resolution// @ [0-9][0-9]Hz}"
|
||||
resolution="${resolution// @ [0-9][0-9][0-9]Hz}"
|
||||
|
|
Reference in New Issue