From c2ac041b5623d2ecf0fd900883a1571100911b8f Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 21 Feb 2016 21:01:46 +1100 Subject: [PATCH] Add resolution support to Windows --- fetch | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fetch b/fetch index a88aeae5..7bf0bad6 100755 --- a/fetch +++ b/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" ;;