]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Match whitespace explicitly in property name
authorLuke Arms <github@lkr.ms>
Thu, 1 Jul 2021 04:34:56 +0000 (14:34 +1000)
committerLuke Arms <github@lkr.ms>
Thu, 1 Jul 2021 04:35:09 +0000 (14:35 +1000)
Also:
- Include additional properties

autorandr.py

index c1bdd1971e81e3d7c174e2f6202a7d18bbe61bd4..f47a994ca2209040569ab76283ea8b2ef45f92f8 100755 (executable)
@@ -71,6 +71,11 @@ properties = [
     "Broadcast RGB",
     "audio",
     "non-desktop",
+    "TearFree",
+    "underscan vborder",
+    "underscan hborder",
+    "underscan",
+    "scaling mode",
 ]
 
 help_text = """
@@ -161,7 +166,7 @@ class XrandrOutput(object):
 
     XRANDR_PROPERTIES_REGEXP = "|".join(
         [r"{}:\s*(?P<{}>[\S ]*\S+)"
-         .format(p, re.sub(r"\W+", "_", p.lower()))
+         .format(re.sub(r"\s", r"\\\g<0>", p), re.sub(r"\W+", "_", p.lower()))
             for p in properties])
 
     # This regular expression is used to parse an output in `xrandr --verbose'