From: Phillip Berndt Date: Fri, 19 Oct 2018 06:27:19 +0000 (+0200) Subject: More generic approach for non-standard mode names. X-Git-Tag: upstream/1.7~1^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=be8a6e7661b233aefee8c070cdd1ebd02d42f254;hp=--cc;p=deb_pkgs%2Fautorandr.git More generic approach for non-standard mode names. Co-Authored-By: Waester --- be8a6e7661b233aefee8c070cdd1ebd02d42f254 diff --git a/autorandr.py b/autorandr.py index 1b65694..1e980f6 100755 --- a/autorandr.py +++ b/autorandr.py @@ -638,7 +638,7 @@ def get_fb_dimensions(configuration): if "off" in output.options or not output.edid: continue # This won't work with all modes -- but it's a best effort. - o_mode = re.search("^[0-9]+x[0-9]+", output.options["mode"]).group(0) + o_mode = re.search("[0-9]{3,}x[0-9]{3,}", output.options["mode"]).group(0) o_width, o_height = map(int, o_mode.split("x")) if "transform" in output.options: a, b, c, d, e, f, g, h, i = map(float, output.options["transform"].split(","))