]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - autorandr.py
Bump version to 1.10
[deb_pkgs/autorandr.git] / autorandr.py
index c8765607bedc0b401a7cb231a731d463eb92fea2..f7356a08a56bd99c67c8076ec6e4d56ed0cb62a5 100755 (executable)
@@ -48,7 +48,7 @@ if sys.version_info.major == 2:
 else:
     import configparser
 
-__version__ = "1.9"
+__version__ = "1.10"
 
 try:
     input = raw_input
@@ -1037,11 +1037,12 @@ def exec_scripts(profile_path, script_name, meta_information=None):
     if not os.path.isdir(user_profile_path):
         user_profile_path = os.path.join(os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config")), "autorandr")
 
-    candidate_directories = [user_profile_path]
-    for config_dir in os.environ.get("XDG_CONFIG_DIRS", "/etc/xdg").split(":"):
-        candidate_directories.append(os.path.join(config_dir, "autorandr"))
+    candidate_directories = []
     if profile_path:
         candidate_directories.append(profile_path)
+    candidate_directories.append(user_profile_path)
+    for config_dir in os.environ.get("XDG_CONFIG_DIRS", "/etc/xdg").split(":"):
+        candidate_directories.append(os.path.join(config_dir, "autorandr"))
 
     for folder in candidate_directories:
         if script_name not in ran_scripts:
@@ -1368,6 +1369,7 @@ def main(argv):
             props = []
             if profile_name in detected_profiles:
                 if len(detected_profiles) == 1:
+                    index = 1
                     props.append("(detected)")
                 else:
                     index = detected_profiles.index(profile_name) + 1