mirror of
https://github.com/ralsina/xrandroll.git
synced 2024-11-23 19:42:23 +00:00
primary monitor parsing
This commit is contained in:
parent
a409fcaa69
commit
8159f07724
@ -61,6 +61,7 @@ class Monitor:
|
|||||||
pos_x = 0
|
pos_x = 0
|
||||||
pos_y = 0
|
pos_y = 0
|
||||||
enabled = False
|
enabled = False
|
||||||
|
primary = False
|
||||||
|
|
||||||
def __init__(self, data):
|
def __init__(self, data):
|
||||||
"""Initialize a monitor object out of data from xrandr --verbose.
|
"""Initialize a monitor object out of data from xrandr --verbose.
|
||||||
@ -70,6 +71,7 @@ class Monitor:
|
|||||||
|
|
||||||
self.header = data.pop(0)
|
self.header = data.pop(0)
|
||||||
self.output = parse.search("{}{:s}", self.header)[0]
|
self.output = parse.search("{}{:s}", self.header)[0]
|
||||||
|
self.primary = "primary" in self.header
|
||||||
self.replica_of = []
|
self.replica_of = []
|
||||||
if "disconnected" in self.header:
|
if "disconnected" in self.header:
|
||||||
# No modes, no pos, no fields, no nothing.
|
# No modes, no pos, no fields, no nothing.
|
||||||
|
Loading…
Reference in New Issue
Block a user