Merge pull request #287 from iandrewt/refresh_osx-2

improved refresh_rate fix, now actually works on OS X...
This commit is contained in:
Dylan Araps 2016-06-15 21:24:51 +10:00 committed by GitHub
commit 5f2f1aaeae

View file

@ -1538,8 +1538,13 @@ getresolution () {
awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')"
fi
[ "$refresh_rate" == "off" ] || [ "${resolution// * @ }" == "0Hz" ] && \
resolution="${resolution// @ *[0-9]Hz}"
if [ "$refresh_rate" == "off" ]; then
resolution="${resolution// @ [0-9][0-9]Hz}"
resolution="${resolution// @ [0-9][0-9][0-9]Hz}"
fi
[[ "$resolution" =~ "0Hz" ]] && \
resolution="${resolution// @ 0Hz}"
;;
"Windows")