X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=autorandr.py;h=3e1788284add3e64078f70ce4289751e39a8d02b;hb=a50b16aa1ad5a6819e902cc0570bbf18421563fc;hp=ccae9681cf243431102162c521d4e12b43f0b4f1;hpb=bf3805c9195ebf50d21bc0d95b15a7ad968feb73;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index ccae968..3e17882 100755 --- a/autorandr.py +++ b/autorandr.py @@ -266,17 +266,20 @@ class XrandrOutput(object): "Return the command line parameters for XRandR for this instance" args = ["--output", self.output] for option, arg in sorted(self.options_with_defaults.items()): - if option[:5] == "prop-": + if option.startswith("x-prop-"): prop_found = False for prop, xrandr_prop in [(re.sub(r"\W+", "_", p.lower()), p) for p in properties]: - if prop == option[5:]: + if prop == option[7:]: args.append("--set") args.append(xrandr_prop) prop_found = True break if not prop_found: - print("Warning: Unknown property `%s' in config file. Skipping." % option[5:], file=sys.stderr) + print("Warning: Unknown property `%s' in config file. Skipping." % option[7:], file=sys.stderr) continue + elif option.startswith("x-"): + print("Warning: Unknown option `%s' in config file. Skipping." % option, file=sys.stderr) + continue else: args.append("--%s" % option) if arg: @@ -429,7 +432,7 @@ class XrandrOutput(object): options["rate"] = match["rate"] for prop in [re.sub(r"\W+", "_", p.lower()) for p in properties]: if match[prop]: - options["prop-" + prop] = match[prop] + options["x-prop-" + prop] = match[prop] return XrandrOutput(match["output"], edid, options), modes