1
0
mirror of https://github.com/gryf/pyrandr.git synced 2025-12-19 13:38:00 +01:00

Added information of primary output in outputs display method

This commit is contained in:
2017-10-15 11:58:56 +02:00
parent 83cbbf5e04
commit 04b9c33365

View File

@@ -52,9 +52,10 @@ class Output(object):
def __repr__(self): def __repr__(self):
active = 'active' if self.active else 'inactive' active = 'active' if self.active else 'inactive'
connected = 'conected' if self.connected else 'disconnected' connected = 'conected' if self.connected else 'disconnected'
primary = 'primary ' if self.primary else ''
if self.connected: if self.connected:
return "%s %s %s (%dx%s)" % (self.name, connected, active, return "%s %s %s %s(%dx%s)" % (self.name, connected, active,
self.x, self.y) primary, self.x, self.y)
else: else:
return "%s %s %s" % (self.name, connected, active) return "%s %s %s" % (self.name, connected, active)
@@ -144,8 +145,8 @@ class Organizer(object):
Arrange displays in horizontal way, starting from first outpu in Arrange displays in horizontal way, starting from first outpu in
output_list as leftmost output_list as leftmost
""" """
logging.info('Set output horizontally in order: %s', ' logging.info('Set output horizontally in order: %s',
'.join(output_list)) ' '.join(output_list))
# check, if primary is in output_list # check, if primary is in output_list
if primary and primary not in output_list: if primary and primary not in output_list: