]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Add crtc value in the config file
authortheperfidious <theperfidious@protonmail.com>
Thu, 21 Mar 2019 07:31:03 +0000 (08:31 +0100)
committertheperfidious <theperfidious@protonmail.com>
Thu, 21 Mar 2019 07:31:03 +0000 (08:31 +0100)
autorandr.py

index cf9b0c8ec0f08c7584830f000c6abd6260bcff42..b18ce7b4d0ad61c456f9e062430a070ea29c0d1b 100755 (executable)
@@ -161,6 +161,7 @@ class XrandrOutput(object):
         (?:[\ \t]*border\ (?P<border>(?:[0-9]+/){3}[0-9]+))?                            # Border information
         (?:\s*(?:                                                                       # Properties of the output
             Gamma: (?P<gamma>(?:inf|[0-9\.: e])+) |                                     # Gamma value
+            CRTC:\s*(?P<crtc>[0-9]) |                                                   # CRTC value
             Transform: (?P<transform>(?:[\-0-9\. ]+\s+){3}) |                           # Transformation matrix
             EDID: (?P<edid>\s*?(?:\\n\\t\\t[0-9a-f]+)+) |                               # EDID of the output
             (?![0-9])[^:\s][^:\n]+:.*(?:\s\\t[\\t ].+)*                                 # Other properties
@@ -363,6 +364,8 @@ class XrandrOutput(object):
                 # so we approximate by 1e-10.
                 gamma = ":".join([str(max(1e-10, round(1. / float(x), 3))) for x in gamma.split(":")])
                 options["gamma"] = gamma
+            if match["crtc"]:
+                options["crtc"] = match["crtc"]
             if match["rate"]:
                 options["rate"] = match["rate"]