remove spurious spaces
[lilass.git] / lilass
diff --git a/lilass b/lilass
index 2352e32d5bcfebbc8691d53e5b57a7ddcebb7457..3512a5fea3a1aeba5d4d3331741c6e9791a94448 100755 (executable)
--- a/lilass
+++ b/lilass
@@ -22,14 +22,6 @@ import gui, screen, util, database
 frontend = gui.getFrontend("cli") # the fallback, until we got a proper frontend. This is guaranteed to be available.
 cmdArgs = None
 
 frontend = gui.getFrontend("cli") # the fallback, until we got a proper frontend. This is guaranteed to be available.
 cmdArgs = None
 
-# for auto-config: common names of internal connectors
-commonInternalConnectorPrefixes = ['LVDS', 'eDP']
-commonInternalConnectorSuffices = ['', '0', '1', '-0', '-1']
-def commonInternalConnectorNames():
-    for prefix in commonInternalConnectorPrefixes:
-        for suffix in commonInternalConnectorSuffices:
-            yield prefix+suffix
-
 # Load a section-less config file: maps parameter names to space-separated lists of strings (with shell quotation)
 def loadConfigFile(filename):
     import shlex
 # Load a section-less config file: maps parameter names to space-separated lists of strings (with shell quotation)
 def loadConfigFile(filename):
     import shlex
@@ -74,23 +66,10 @@ def situationByConfig(config):
             raise Exception("You must specify exactly one internal connector.")
         internalConnectors = config['internalConnector']
     else:
             raise Exception("You must specify exactly one internal connector.")
         internalConnectors = config['internalConnector']
     else:
-        internalConnectors = commonInternalConnectorNames()
+        internalConnectors = screen.commonInternalConnectorNames()
     # run!
     return screen.ScreenSituation(internalConnectors, config.get('externalConnectors'))
 
     # run!
     return screen.ScreenSituation(internalConnectors, config.get('externalConnectors'))
 
-class ShowLevels(Enum):
-    ONEXTERNAL = ("on-external")
-    ONNEW = ("on-new")
-    ONERROR = ("on-error")
-    def __init__(self, text):
-        # auto numbering
-        cls = self.__class__
-        self._value_ = len(cls.__members__) + 1
-        self.text = text
-    @classmethod
-    def getNames(cls):
-        return list(x.text for x in cls)
-
 # if we run top-level
 if __name__ == "__main__":
     try:
 # if we run top-level
 if __name__ == "__main__":
     try:
@@ -173,9 +152,9 @@ if __name__ == "__main__":
                 setup = screen.ScreenSetup(intResolution = None, extResolution = situation.externalConnector.getPreferredResolution())
             elif cmdArgs.rel_position is not None:
                 # construct automatically, based on CLI arguments
                 setup = screen.ScreenSetup(intResolution = None, extResolution = situation.externalConnector.getPreferredResolution())
             elif cmdArgs.rel_position is not None:
                 # construct automatically, based on CLI arguments
-                # first, figure out the desired RelativeScreenPosition... waht a bad hack...
+                # first, figure out the desired RelativeScreenPosition... what a bad hack...
                 relPos = list(filter(lambda relPosItem: relPosFilter(relPosItem[0]) == cmdArgs.rel_position, screen.RelativeScreenPosition.__members__.items()))
                 relPos = list(filter(lambda relPosItem: relPosFilter(relPosItem[0]) == cmdArgs.rel_position, screen.RelativeScreenPosition.__members__.items()))
-                assert len(relPos) == 1, "CLI argument is ambigue"
+                assert len(relPos) == 1, "CLI argument is ambiguous"
                 relPos = relPos[0][1]
                 # now we construct the ScreenSetup
                 if relPos == screen.RelativeScreenPosition.MIRROR:
                 relPos = relPos[0][1]
                 # now we construct the ScreenSetup
                 if relPos == screen.RelativeScreenPosition.MIRROR: