Fixed comma character in macos resolution

This commit is contained in:
Antoni Siek
2019-12-09 01:25:31 +01:00
committed by GitHub
parent 29c88fb1f8
commit 5a2ed4be2d

View File

@@ -1901,7 +1901,7 @@ detectres () {
if [[ ${distro} == "Mac OS X" ]]; then
xResolution=$(system_profiler SPDisplaysDataType | awk '/Resolution:/ {print $2"x"$4" "}')
if [[ "$(echo "$xResolution" | wc -l)" -ge 1 ]]; then
xResolution=$(echo "$xResolution" | tr "\\n" "," | sed 's/\(.*\),/\1/')
xResolution=$(echo "$xResolution" | tr " \\n" ", " | sed 's/\(.*\),/\1/')
fi
elif [[ "${distro}" == "Cygwin" || "${distro}" == "Msys" ]]; then
xResolution=$(wmic path Win32_VideoController get CurrentHorizontalResolution,CurrentVerticalResolution | awk 'NR==2 {print $1"x"$2}')