Add resolution support to Windows
This commit is contained in:
parent
c75163bfd7
commit
c2ac041b56
1 changed files with 8 additions and 0 deletions
8
fetch
8
fetch
|
@ -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"
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue