From c24425d941f8a7c6a254afcb49769558dc41d698 Mon Sep 17 00:00:00 2001 From: Phillip Berndt Date: Mon, 6 Apr 2015 01:26:32 +0200 Subject: [PATCH] A screen can be disabled yet primary --- autorandr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.2