shorten if statement for retina check

parent 52e08842
...@@ -1326,9 +1326,8 @@ getresolution() { ...@@ -1326,9 +1326,8 @@ getresolution() {
scale_factor="$(/usr/libexec/PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" /Library/Preferences/com.apple.windowserver.plist)" 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 @}" resolution="${resolution// @/@2x @}"
fi
if [ "$refresh_rate" == "off" ]; then if [ "$refresh_rate" == "off" ]; then
resolution="${resolution// @ [0-9][0-9]Hz}" resolution="${resolution// @ [0-9][0-9]Hz}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment