X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=autorandr.py;h=1e980f6f7c0f7bc8f96999e36f5162a3971f5403;hb=6d40d3cfba4691753661c6c786759bbc6f0ac3b1;hp=9524f4274d8275ca32bb9b53c8d55673cd1a5684;hpb=1a48d584fe533555581f3f98818cd0ad9bd92334;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index 9524f42..1e980f6 100755 --- a/autorandr.py +++ b/autorandr.py @@ -48,7 +48,7 @@ if sys.version_info.major == 2: else: import configparser -__version__ = "1.6" +__version__ = "1.7" try: input = raw_input @@ -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]{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(",")) w = (g * o_width + h * o_height + i)