mirror of
https://github.com/ralsina/xrandroll.git
synced 2024-11-25 04:12:23 +00:00
Ignore monitors that are disconnected
This commit is contained in:
parent
e0384672dd
commit
b5d1492373
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "xrandroll"
|
name = "xrandroll"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
description = "A powertool to configure your display"
|
description = "A powertool to configure your display"
|
||||||
authors = ["Roberto Alsina <roberto.alsina@gmail.com>"]
|
authors = ["Roberto Alsina <roberto.alsina@gmail.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -312,7 +312,9 @@ class Window(QObject):
|
|||||||
data = subprocess.check_output(["xrandr"]).decode("utf-8").splitlines()
|
data = subprocess.check_output(["xrandr"]).decode("utf-8").splitlines()
|
||||||
name = None
|
name = None
|
||||||
for line in data:
|
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,
|
name,
|
||||||
primary,
|
primary,
|
||||||
|
Loading…
Reference in New Issue
Block a user