From: Phillip Berndt Date: Sat, 11 Apr 2020 12:14:53 +0000 (+0200) Subject: Handle negative gamma values X-Git-Tag: 1.10~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=cde6a0e940d736a84ff1390d3306794e1ee49627;p=deb_pkgs%2Fautorandr.git Handle negative gamma values Fixes #188. --- diff --git a/README.md b/README.md index ab3d23d..9e32355 100644 --- a/README.md +++ b/README.md @@ -215,6 +215,7 @@ profiles matching multiple (or any) monitors. ## Changelog **autorandr 1.10 (dev)** +* *2020-04-11* Handle negative gamma values (fixes #188) * *2020-04-11* Sort approximate matches in detected profiles by quality of match * *2019-12-31* Fix output positioning if the top-left output is not the first * *2019-12-31* Accept negative gamma values (and interpret them as 0) diff --git a/autorandr.py b/autorandr.py index 295d01a..c876560 100755 --- a/autorandr.py +++ b/autorandr.py @@ -172,7 +172,7 @@ class XrandrOutput(object): (?:[\ \t]*tracking\ (?P[0-9]+x[0-9]+\+[0-9]+\+[0-9]+))? # Tracking information (?:[\ \t]*border\ (?P(?:[0-9]+/){3}[0-9]+))? # Border information (?:\s*(?: # Properties of the output - Gamma: (?P(?:inf|[0-9\.\-: e])+) | # Gamma value + Gamma: (?P(?:inf|-?[0-9\.\-: e])+) | # Gamma value CRTC:\s*(?P[0-9]) | # CRTC value Transform: (?P(?:[\-0-9\. ]+\s+){3}) | # Transformation matrix EDID: (?P\s*?(?:\\n\\t\\t[0-9a-f]+)+) | # EDID of the output