]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
getopt: load profile from args
authorChristoph Gysin <christoph.gysin@gmail.com>
Sun, 5 Nov 2017 21:27:31 +0000 (23:27 +0200)
committerChristoph Gysin <christoph.gysin@gmail.com>
Mon, 6 Nov 2017 18:12:53 +0000 (20:12 +0200)
autorandr.py

index 119500bd1cbc73b18c167635ddaeb3523fd9b2dc..e5ab42fdd0308695e720b6ada0415ccdd8751c0e 100755 (executable)
@@ -1072,6 +1072,8 @@ def main(argv):
         options["--load"] = options["-l"]
     if "--load" in options:
         load_profile = options["--load"]
         options["--load"] = options["-l"]
     if "--load" in options:
         load_profile = options["--load"]
+    elif len(args) == 1:
+        load_profile = args[0]
     else:
         # Find the active profile(s) first, for the block script (See #42)
         current_profiles = []
     else:
         # Find the active profile(s) first, for the block script (See #42)
         current_profiles = []