- if usedExternalConnector is not None: # there's an external screen connected, we need to ask what to do
- # get setup
- dialogue = gui.getDialogue(connectors[internalConnector], connectors[usedExternalConnector])
- setup = dialogue.run()
+ if usedExternalConnector is not None:
+ # there's an external screen connected, we need to get a setup
+ if cmdArgs.rel_position is not None:
+ # use command-line arguments (can we do this relPosition stuff more elegant?)
+ if cmdArgs.rel_position == 'left':
+ relPosition = RelativeScreenPosition.LEFT
+ elif cmdArgs.rel_position == 'right':
+ relPosition = RelativeScreenPosition.RIGHT
+ else:
+ relPosition = RelativeScreenPosition.EXTERNAL_ONLY
+ setup = ScreenSetup(relPosition, connectors[internalConnector][0], connectors[usedExternalConnector][0]) # use default resolutions
+ else:
+ # use GUI
+ setup = frontend.setup(connectors[internalConnector], connectors[usedExternalConnector])