Actual working/tested windows resolution support

This commit is contained in:
Dylan 2016-02-21 21:48:49 +11:00
parent c2ac041b56
commit 5b499beb57

14
fetch
View file

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