]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - autorandr.py
Update README
[deb_pkgs/autorandr.git] / autorandr.py
index f05981782002a7a3ab01c9e208eea5060743cfed..b781f4d77b5b91fa565eb14e3e22732c26baeaac 100755 (executable)
@@ -173,7 +173,7 @@ class XrandrOutput(object):
         (?:[\ \t]*tracking\ (?P<tracking>[0-9]+x[0-9]+\+[0-9]+\+[0-9]+))?               # Tracking information
         (?:[\ \t]*border\ (?P<border>(?:[0-9]+/){3}[0-9]+))?                            # Border information
         (?:\s*(?:                                                                       # Properties of the output
-            Gamma: (?P<gamma>(?:inf|[0-9\.: e])+) |                                     # Gamma value
+            Gamma: (?P<gamma>(?:inf|[0-9\.\-: e])+) |                                   # Gamma value
             CRTC:\s*(?P<crtc>[0-9]) |                                                   # CRTC value
             Transform: (?P<transform>(?:[\-0-9\. ]+\s+){3}) |                           # Transformation matrix
             EDID: (?P<edid>\s*?(?:\\n\\t\\t[0-9a-f]+)+) |                               # EDID of the output
@@ -717,7 +717,7 @@ def get_fb_dimensions(configuration):
 
 def apply_configuration(new_configuration, current_configuration, dry_run=False):
     "Apply a configuration"
-    found_candidate = False
+    found_top_left_monitor = False
     found_left_monitor = False
     found_top_monitor = False
     outputs = sorted(new_configuration.keys(), key=lambda x: new_configuration[x].sort_key)
@@ -779,10 +779,10 @@ def apply_configuration(new_configuration, current_configuration, dry_run=False)
                                 option_vector = option_vector[:option_index] + option_vector[option_index + 2:]
                         except ValueError:
                             pass
-            if not found_candidate:
+            if not found_top_left_monitor:
                 position = new_configuration[output].options.get("pos", "0x0")
                 if position == "0x0":
-                    found_candidate = True
+                    found_top_left_monitor = True
                     enable_outputs.insert(0, option_vector)
                 elif not found_left_monitor and position.startswith("0x"):
                     found_left_monitor = True
@@ -822,7 +822,7 @@ def apply_configuration(new_configuration, current_configuration, dry_run=False)
 
     # If we did not find a candidate, we might need to inject a call
     # If there is no output to disable, we will enable 0x and x0 at the same time
-    if not found_candidate and len(disable_outputs) > 0:
+    if not found_top_left_monitor and len(disable_outputs) > 0:
         # If the call to 0x and x0 is splitted, inject one of them
         if found_top_monitor and found_left_monitor:
             enable_outputs.insert(0, enable_outputs[0])