mirror of
https://github.com/KittyKatt/screenFetch.git
synced 2026-01-14 08:48:03 -05:00
Fix multi-monitor detection on OS X
This commit is contained in:
@@ -966,6 +966,9 @@ detectres () {
|
||||
fi
|
||||
elif [[ ${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/')
|
||||
fi
|
||||
elif [[ "${distro}" == "Cygwin" ]]; then
|
||||
width=$(wmic desktopmonitor get screenwidth | grep -vE '[a-z]+' | tr -d '\r\n ')
|
||||
height=$(wmic desktopmonitor get screenheight | grep -vE '[a-z]+' | tr -d '\r\n ')
|
||||
|
||||
Reference in New Issue
Block a user