Actual working/tested windows resolution support

This commit is contained in:
Dylan 2016-02-21 21:48:49 +11:00
parent c2ac041b56
commit 5b499beb57
1 changed files with 9 additions and 5 deletions

14
fetch
View File

@ -1119,11 +1119,15 @@ getresolution () {
;;
"Windows")
resolution=$(wmic desktopmonitor get screenwidth, screenheight /value 2>/dev/null)
resolution=${resolution//ScreenWidth'='/ }
resolution=${resolution//ScreenHeight'='/x}
resolution=${resolution//$'\n'/}
resolution=${resolution/ }
width=$(wmic desktopmonitor get screenwidth /value 2>/dev/null)
width=${width/ScreenWidth'='/}
width=${width//[[:space:]]}
height=$(wmic desktopmonitor get screenheight /value 2>/dev/null)
height=${height/ScreenHeight'='/}
height=${height//[[:space:]]}
resolution="${width}x${height}"
;;
"*")