]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - autorandr.py
New upstream version 1.14
[deb_pkgs/autorandr.git] / autorandr.py
index cd99d924b11eba0635ba1ac42f7d94aac362d655..93b4e79ca09a13ac621bffa92f6302d508d60bdf 100755 (executable)
@@ -50,7 +50,7 @@ if sys.version_info.major == 2:
 else:
     import configparser
 
-__version__ = "1.13.3"
+__version__ = "1.14"
 
 try:
     input = raw_input
@@ -735,7 +735,7 @@ def update_profiles_edid(profiles, config):
                 if profile_config[c].fingerprint != fingerprint or c == fp_map[fingerprint]:
                     continue
 
-                print("%s: renaming display %s to %s" % (p, c, fp_map[fingerprint]))
+                print("%s: renaming display %s to %s" % (p, c, fp_map[fingerprint]), file=sys.stderr)
 
                 tmp_disp = profile_config[c]
 
@@ -1325,6 +1325,11 @@ def dispatch_call_to_sessions(argv):
             # Cannot work with this environment, skip.
             continue
 
+        if "WAYLAND_DISPLAY" in process_environ and process_environ["WAYLAND_DISPLAY"]:
+            if "--debug" in argv:
+                print("Detected Wayland session '{0}'. Skipping.".format(process_environ["WAYLAND_DISPLAY"]))
+            continue
+
         # To allow scripts to detect batch invocation (especially useful for predetect)
         process_environ["AUTORANDR_BATCH_PID"] = str(os.getpid())
         process_environ["UID"] = str(uid)
@@ -1437,6 +1442,9 @@ def main(argv):
         user = pwd.getpwuid(os.getuid())
         user = user.pw_name if user else "#%d" % os.getuid()
         print("autorandr running as user %s (started from batch instance)" % user)
+    if ("WAYLAND_DISPLAY" in os.environ and os.environ["WAYLAND_DISPLAY"]):
+        print("Detected Wayland session '{0}'. Exiting.".format(os.environ["WAYLAND_DISPLAY"]), file=sys.stderr)
+        sys.exit(1)
 
     profiles = {}
     profile_symlinks = {}