From: Franz Berger Date: Fri, 29 Jul 2022 13:44:10 +0000 (+0200) Subject: Add support for transformation filter (--filter) X-Git-Tag: 1.13~17 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=caba4885832abb1086b09c7b9253a587866dd70a;p=deb_pkgs%2Fautorandr.git Add support for transformation filter (--filter) --- diff --git a/autorandr.py b/autorandr.py index 31c29d8..9f3384c 100755 --- a/autorandr.py +++ b/autorandr.py @@ -203,6 +203,7 @@ class XrandrOutput(object): Gamma: (?P(?:inf|-?[0-9\.\-: e])+) | # Gamma value CRTC:\s*(?P[0-9]) | # CRTC value Transform: (?P(?:[\-0-9\. ]+\s+){3}) | # Transformation matrix + filter:\s+(?Pbilinear|nearest) | # Transformation filter EDID: (?P\s*?(?:\\n\\t\\t[0-9a-f]+)+) | # EDID of the output """ + XRANDR_PROPERTIES_REGEXP + """ | # Properties to include in the profile (?![0-9])[^:\s][^:\n]+:.*(?:\s\\t[\\t ].+)* # Other properties @@ -444,6 +445,8 @@ class XrandrOutput(object): # I doubt that this special case is actually required. print("Warning: Output %s has a transformation applied. Could not determine correct mode! " "Using `%s'." % (match["output"], options["mode"]), file=sys.stderr) + if match["filter"]: + options["filter"] = match["filter"] if match["gamma"]: gamma = match["gamma"].strip() # xrandr prints different values in --verbose than it accepts as a parameter value for --gamma