shorten if statement for retina check

This commit is contained in:
Andrew Titmuss
2016-10-16 00:45:27 +11:00
parent 52e0884250
commit 2010d11328

View File

@@ -1326,9 +1326,8 @@ getresolution() {
scale_factor="$(/usr/libexec/PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" /Library/Preferences/com.apple.windowserver.plist)"
if [ "${scale_factor%.*}" == "2" ]; then
[ "${scale_factor%.*}" == "2" ] && \
resolution="${resolution// @/@2x @}"
fi
if [ "$refresh_rate" == "off" ]; then
resolution="${resolution// @ [0-9][0-9]Hz}"