]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Detect modes that have *current at the end of the mode line
authorPhillip Berndt <phillip.berndt@googlemail.com>
Wed, 8 Apr 2015 08:14:39 +0000 (10:14 +0200)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Wed, 8 Apr 2015 08:14:39 +0000 (10:14 +0200)
autorandr.py

index aa464d61090774470ddef778b58e475f7b13ed74..69125d1abc3008d523314ef37f15fbe1e09ffb06 100755 (executable)
@@ -106,9 +106,9 @@ class XrandrOutput(object):
         ))+
         \s*
         (?P<modes>(?:
-            (?P<mode_width>[0-9]+)x(?P<mode_height>[0-9]+).+?\*current.+\s+
+            (?P<mode_width>[0-9]+)x(?P<mode_height>[0-9]+).+?\*current.*\s+
                 h:.+\s+v:.+clock\s+(?P<rate>[0-9\.]+)Hz\s* |                            # Interesting (current) resolution: Extract rate
-            [0-9]+x[0-9]+.+\s+h:.+\s+v:.+\s*                                            # Other resolutions
+            [0-9]+x[0-9]+(?:(?!\*current).)+\s+h:.+\s+v:.+\s*                           # Other resolutions
         )*)
     """