From caba4885832abb1086b09c7b9253a587866dd70a Mon Sep 17 00:00:00 2001 From: Franz Berger Date: Fri, 29 Jul 2022 15:44:10 +0200 Subject: [PATCH] Add support for transformation filter (--filter) --- autorandr.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.39.2