From: Phillip Berndt Date: Wed, 8 Apr 2015 08:14:19 +0000 (+0200) Subject: Detect tracking/border information for --panning X-Git-Tag: 1.0~61 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=1a37be02ae147c492e0e5f91b0f4537d888c6414 Detect tracking/border information for --panning --- diff --git a/autorandr.py b/autorandr.py index 9a677ab..aa464d6 100755 --- a/autorandr.py +++ b/autorandr.py @@ -96,6 +96,8 @@ class XrandrOutput(object): )? # .. but everything of the above only if the screen is in use. (?:[\ \t]*\([^\)]+\))(?:\s*[0-9]+mm\sx\s[0-9]+mm)? (?:[\ \t]*panning\ (?P[0-9]+x[0-9]+\+[0-9]+\+[0-9]+))? # Panning information + (?:[\ \t]*tracking\ (?P[0-9]+x[0-9]+\+[0-9]+\+[0-9]+))? # Tracking information + (?:[\ \t]*border\ (?P(?:[0-9]+/){3}[0-9]+))? # Border information (?:\s*(?: # Properties of the output Gamma: (?P[0-9\.: ]+) | # Gamma value Transform: (?P(?:[\-0-9\. ]+\s+){3}) | # Transformation matrix @@ -241,7 +243,12 @@ class XrandrOutput(object): options["reflect"] = "xy" options["pos"] = "%sx%s" % (match["x"], match["y"]) if match["panning"]: - options["panning"] = match["panning"] + panning = [ match["panning"] ] + if match["tracking"]: + panning += [ "/", match["tracking"] ] + if match["border"]: + panning += [ "/", match["border"] ] + options["panning"] = "".join(panning) if match["transform"]: transformation = ",".join(match["transform"].strip().split()) if transformation != "1.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,1.000000":