Support to skip properties using --skip-option set

See bug #297 and bug #299.
This commit is contained in:
Phillip Berndt 2022-12-01 08:30:36 +01:00
parent 4db718e759
commit 5a6ded231f
2 changed files with 9 additions and 1 deletions

View File

@ -255,6 +255,9 @@ options nvidia_drm modeset=1
## Changelog
**autorandr 1.13 (dev)**
* *2022-12-01* Support `--skip-option set` to skip setting properties
**autorandr 1.12.1**
* *2021-12-22* Fix `--match-edid` (see #273)

View File

@ -257,12 +257,17 @@ class XrandrOutput(object):
if xrandr_version() >= Version("1.2"):
options.update(self.XRANDR_12_DEFAULTS)
options.update(self.options)
if "set" in self.ignored_options:
options = {a: b for a, b in options.items() if not a.startswith("x-prop")}
return {a: b for a, b in options.items() if a not in self.ignored_options}
@property
def filtered_options(self):
"Return a dictionary of options without ignored options"
return {a: b for a, b in self.options.items() if a not in self.ignored_options}
options = {a: b for a, b in self.options.items() if a not in self.ignored_options}
if "set" in self.ignored_options:
options = {a: b for a, b in options.items() if not a.startswith("x-prop")}
return options
@property
def option_vector(self):