From: Waester Date: Thu, 11 Oct 2018 13:55:48 +0000 (+0200) Subject: Partially support modes with non-standard names X-Git-Tag: upstream/1.7~1^2~1 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=3b6bb6b6f15e1f1df22081e5e3938a10f99b83f5 Partially support modes with non-standard names --- diff --git a/autorandr.py b/autorandr.py index d36b568..1b65694 100755 --- a/autorandr.py +++ b/autorandr.py @@ -638,7 +638,8 @@ 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_width, o_height = map(int, output.options["mode"].split("x")) + o_mode = re.search("^[0-9]+x[0-9]+", 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(",")) w = (g * o_width + h * o_height + i)