X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=autorandr.py;h=93b4e79ca09a13ac621bffa92f6302d508d60bdf;hb=HEAD;hp=cd99d924b11eba0635ba1ac42f7d94aac362d655;hpb=05bc32c134de60e21f14f1faa915a8b336a1264c;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index cd99d92..93b4e79 100755 --- a/autorandr.py +++ b/autorandr.py @@ -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 = {}