]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - autorandr.py
Fix exec_scripts: candidate_directories broke for XDG/profile_path
[deb_pkgs/autorandr.git] / autorandr.py
index c14aa723869dd2a16d5aacb6f67316a2f5563ce2..f0cf4ac78f13b604ab3e08a94a1f954b1fdd8c2c 100755 (executable)
@@ -656,9 +656,9 @@ def apply_configuration(new_configuration, current_configuration, dry_run=False)
 
             option_vector = new_configuration[output].option_vector
             if xrandr_version() >= Version("1.3.0"):
-                for option in ("transform", "panning"):
+                for option, off_value in (("transform", "none"), ("panning", "0x0")):
                     if option in current_configuration[output].options:
-                        auxiliary_changes_pre.append(["--output", output, "--%s" % option, "none"])
+                        auxiliary_changes_pre.append(["--output", output, "--%s" % option, off_value])
                     else:
                         try:
                             option_index = option_vector.index("--%s" % option)
@@ -865,12 +865,11 @@ def exec_scripts(profile_path, script_name, meta_information=None):
 
     candidate_directories = [user_profile_path]
     for config_dir in os.environ.get("XDG_CONFIG_DIRS", "/etc/xdg").split(":"):
-        candidate_directories += os.path.join(config_dir, "autorandr")
+        candidate_directories.append(os.path.join(config_dir, "autorandr"))
     if profile_path:
-        candidate_directories += profile_path
+        candidate_directories.append(profile_path)
 
     for folder in candidate_directories:
-
         if script_name not in ran_scripts:
             script = os.path.join(folder, script_name)
             if os.access(script, os.X_OK | os.F_OK):