Add resolution support to Windows

This commit is contained in:
Dylan 2016-02-21 21:01:46 +11:00
parent c75163bfd7
commit c2ac041b56

8
fetch
View file

@ -1118,6 +1118,14 @@ getresolution () {
awk '/Resolution:/ {printf $2"x"$4" "}')
;;
"Windows")
resolution=$(wmic desktopmonitor get screenwidth, screenheight /value 2>/dev/null)
resolution=${resolution//ScreenWidth'='/ }
resolution=${resolution//ScreenHeight'='/x}
resolution=${resolution//$'\n'/}
resolution=${resolution/ }
;;
"*")
resolution="Unknown"
;;