From: Phillip Berndt Date: Sun, 5 Apr 2015 23:26:32 +0000 (+0200) Subject: A screen can be disabled yet primary X-Git-Tag: 1.0~64 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=c24425d941f8a7c6a254afcb49769558dc41d698 A screen can be disabled yet primary --- diff --git a/autorandr.py b/autorandr.py index 257f2f9..526a753 100755 --- a/autorandr.py +++ b/autorandr.py @@ -85,8 +85,9 @@ class XrandrOutput(object): unknown\ connection | (?Pconnected) ) - (?:\s* - (?Pprimary\ )? # Might be primary screen + \s* + (?Pprimary\ )? # Might be primary screen + (?:\s* # The remainder of the first line only appears as one or not at all: (?P[0-9]+)x(?P[0-9]+) # Resolution (might be overridden below!) \+(?P[0-9]+)\+(?P[0-9]+)\s+ # Position (?:\(0x[0-9a-fA-F]+\)\s+)? # XID