Ignore monitors that are disconnected

This commit is contained in:
Roberto Alsina 2020-02-03 10:31:59 -03:00
parent e0384672dd
commit b5d1492373
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "xrandroll"
version = "0.1.1"
version = "0.1.2"
description = "A powertool to configure your display"
authors = ["Roberto Alsina <roberto.alsina@gmail.com>"]
license = "MIT"

View File

@ -312,7 +312,9 @@ class Window(QObject):
data = subprocess.check_output(["xrandr"]).decode("utf-8").splitlines()
name = None
for line in data:
if line and line[0] not in "S \t": # Output line
if (
line and line[0] not in "S \t" and "disconnected" not in line
): # Output line
(
name,
primary,