Support screen resolution on Windows 10

Edited the WMIC command used so that the screen resolution can be obtained on Windows 10.
This commit is contained in:
dar-irl 2016-05-16 15:45:42 -04:00
parent 4c24d4ac00
commit f754c3fe21
1 changed files with 4 additions and 4 deletions

View File

@ -1543,12 +1543,12 @@ getresolution () {
;;
"Windows")
width=$(wmic desktopmonitor get screenwidth /value 2>/dev/null)
width=${width/ScreenWidth'='/}
width=$(wmic path Win32_VideoController get CurrentHorizontalResolution /value 2>/dev/null)
width=${width/CurrentHorizontalResolution'='/}
width=${width//[[:space:]]}
height=$(wmic desktopmonitor get screenheight /value 2>/dev/null)
height=${height/ScreenHeight'='/}
height=$(wmic path Win32_VideoController get CurrentVerticalResolution /value 2>/dev/null)
height=${height/CurrentVerticalResolution'='/}
height=${height//[[:space:]]}
[ ! -z "$width" ] && \