Skip to content

Commit 68d0d42

Browse files
committed
Detect modes that have *current at the end of the mode line
1 parent 1a37be0 commit 68d0d42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autorandr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ class XrandrOutput(object):
106106
))+
107107
\s*
108108
(?P<modes>(?:
109-
(?P<mode_width>[0-9]+)x(?P<mode_height>[0-9]+).+?\*current.+\s+
109+
(?P<mode_width>[0-9]+)x(?P<mode_height>[0-9]+).+?\*current.*\s+
110110
h:.+\s+v:.+clock\s+(?P<rate>[0-9\.]+)Hz\s* | # Interesting (current) resolution: Extract rate
111-
[0-9]+x[0-9]+.+\s+h:.+\s+v:.+\s* # Other resolutions
111+
[0-9]+x[0-9]+(?:(?!\*current).)+\s+h:.+\s+v:.+\s* # Other resolutions
112112
)*)
113113
"""
114114

0 commit comments

Comments
 (0)