Commit 05a92519 authored by Dylan Araps's avatar Dylan Araps Committed by GitHub

Merge pull request #454 from dylanaraps/macos

Resolution: [MacOS] If refresh rate is empty don't append Hz
parents f2e5c1c1 474e0b4f
...@@ -1262,6 +1262,10 @@ get_resolution() { ...@@ -1262,6 +1262,10 @@ get_resolution() {
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 no refresh rate is empty.
[[ "$resolution" =~ "@ Hz" ]] && \
resolution="${resolution//@ Hz}"
(("${scale_factor%.*}" == 2)) && \ (("${scale_factor%.*}" == 2)) && \
resolution="${resolution// @/@2x @}" resolution="${resolution// @/@2x @}"
......
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