projects
/
lilass.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d45277d
)
Fix what I broke... *oops*
author
Ralf Jung
<post@ralfj.de>
Sat, 6 Oct 2012 10:46:22 +0000
(12:46 +0200)
committer
Ralf Jung
<post@ralfj.de>
Sat, 6 Oct 2012 10:46:22 +0000
(12:46 +0200)
dsl.py
patch
|
blob
|
history
diff --git
a/dsl.py
b/dsl.py
index c7ea0f9ad333dc0d249edc4eacd4f66ca6f1afd2..d5802764c5e8c6167d05c000b5816fdb7606d8b5 100755
(executable)
--- a/
dsl.py
+++ b/
dsl.py
@@
-86,9
+86,9
@@
def res2user(res):
strRatio = '16:%d' % ratio
return '%dx%d (%s)' %(w, h, strRatio)
strRatio = '16:%d' % ratio
return '%dx%d (%s)' %(w, h, strRatio)
-def findAvailableConnector(tryConnectors):
+def findAvailableConnector(tryConnectors
, allConnectors
):
for connector in tryConnectors:
for connector in tryConnectors:
- if connector in
connectors and c
onnectors[connector]: # if the connector exists and is active (i.e. there is a resolution)
+ if connector in
allConnectors and allC
onnectors[connector]: # if the connector exists and is active (i.e. there is a resolution)
return connector
return None
return connector
return None
@@
-106,7
+106,7
@@
def main():
raise Exception("Connector %s does not exist, there is an error in your config file." % internalConnector)
else:
# auto-config
raise Exception("Connector %s does not exist, there is an error in your config file." % internalConnector)
else:
# auto-config
- internalConnector = findAvailableConnector(commonInternalConnectorNames)
+ internalConnector = findAvailableConnector(commonInternalConnectorNames
, connectors
)
if internalConnector is None:
raise Exception("Could not automatically find internal connector, please use ~/.dsl.conf to specify it manually.")
# all the rest is external then, obviously - unless the user wants to do that manually
if internalConnector is None:
raise Exception("Could not automatically find internal connector, please use ~/.dsl.conf to specify it manually.")
# all the rest is external then, obviously - unless the user wants to do that manually
@@
-127,7
+127,7
@@
def main():
args[c] = ["--off"]
# Check what to do
args[c] = ["--off"]
# Check what to do
- usedExternalConnector = findAvailableConnector(externalConnectors) # *the* external connector which is actually used
+ usedExternalConnector = findAvailableConnector(externalConnectors
, connectors
) # *the* external connector which is actually used
if usedExternalConnector is not None: # there's an external screen connected, we need to ask what to do
internalResolutions = connectors[internalConnector]
externalResolutions = connectors[usedExternalConnector]
if usedExternalConnector is not None: # there's an external screen connected, we need to ask what to do
internalResolutions = connectors[internalConnector]
externalResolutions = connectors[usedExternalConnector]