Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package nwg-displays for openSUSE:Factory checked in at 2024-07-19 15:26:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nwg-displays (Old) and /work/SRC/openSUSE:Factory/.nwg-displays.new.17339 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "nwg-displays" Fri Jul 19 15:26:26 2024 rev:7 rq:1188285 version:0.3.20 Changes: -------- --- /work/SRC/openSUSE:Factory/nwg-displays/nwg-displays.changes 2024-03-27 20:43:07.270344838 +0100 +++ /work/SRC/openSUSE:Factory/.nwg-displays.new.17339/nwg-displays.changes 2024-07-19 15:26:41.089629763 +0200 @@ -1,0 +2,10 @@ +Thu Jul 18 01:11:41 UTC 2024 - Avindra Goolcharan <avindra@opensuse.org> + +- Update to version 0.3.20 + * Added try clause for Gdk.Monitor assignment error #60 + * Added workaround for gtk3-1:3.24.42 Gdk.Monitor bug + * Hopefully fixed f-string error on python<3.12. #58 + * Added support for upcoming new Hyprland socket files location + in $XDG_RUNTIME_DIR/hypr. + +------------------------------------------------------------------- Old: ---- nwg-displays-0.3.16.tar.gz New: ---- nwg-displays-0.3.20.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nwg-displays.spec ++++++ --- /var/tmp/diff_new_pack.6FTQO6/_old 2024-07-19 15:26:41.829659208 +0200 +++ /var/tmp/diff_new_pack.6FTQO6/_new 2024-07-19 15:26:41.833659367 +0200 @@ -17,7 +17,7 @@ Name: nwg-displays -Version: 0.3.16 +Version: 0.3.20 Release: 0 Summary: A GTK3 wrapper to display text on the desktop for wlroots License: MIT ++++++ nwg-displays-0.3.16.tar.gz -> nwg-displays-0.3.20.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-displays-0.3.16/nwg_displays/tools.py new/nwg-displays-0.3.20/nwg_displays/tools.py --- old/nwg-displays-0.3.16/nwg_displays/tools.py 2024-03-21 01:41:12.000000000 +0100 +++ new/nwg-displays-0.3.20/nwg_displays/tools.py 2024-05-30 00:47:59.000000000 +0200 @@ -28,8 +28,13 @@ def hyprctl(cmd): + # /tmp/hypr moved to $XDG_RUNTIME_DIR/hypr in #5788 + xdg_runtime_dir = os.getenv("XDG_RUNTIME_DIR") + hypr_dir = f"{xdg_runtime_dir}/hypr" if xdg_runtime_dir and os.path.isdir( + f"{xdg_runtime_dir}/hypr") else "/tmp/hypr" + s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) - s.connect("/tmp/hypr/{}/.socket.sock".format(os.getenv("HYPRLAND_INSTANCE_SIGNATURE"))) + s.connect(f"{hypr_dir}/{os.getenv('HYPRLAND_INSTANCE_SIGNATURE')}/.socket.sock") s.send(cmd.encode("utf-8")) output = s.recv(20480).decode('utf-8') @@ -164,24 +169,22 @@ eprint("This program only supports sway and Hyprland, and we seem to be elsewhere, terminating.") sys.exit(1) - # assign Gdk monitors + # We used to assign Gdk.Monitor to output on the basis of x and y coordinates, but it no longer works, + # starting from gtk3-1:3.24.42: all monitors have x=0, y=0. This is most likely a bug, but from now on + # we must rely on gdk monitors order. + monitors = [] display = Gdk.Display.get_default() for i in range(display.get_n_monitors()): monitor = display.get_monitor(i) - geometry = monitor.get_geometry() - if os.getenv("HYPRLAND_INSTANCE_SIGNATURE"): - # This will fail for 2 displays of the same model and coordinates, but we have no better way - for key in outputs_dict: - if (int(outputs_dict[key]["x"]) == geometry.x and int(outputs_dict[key]["y"]) == geometry.y - and outputs_dict[key]["model"] == monitor.get_model()): - outputs_dict[key]["monitor"] = monitor - break - else: - # we don't know the model value on sway :/ - for key in outputs_dict: - if int(outputs_dict[key]["x"]) == geometry.x and int(outputs_dict[key]["y"]) == geometry.y: - outputs_dict[key]["monitor"] = monitor - break + monitors.append(monitor) + + idx = 0 + for key in outputs_dict: + try: + outputs_dict[key]["monitor"] = monitors[idx] + except IndexError: + print(f"Couldn't assign a Gdk.Monitor to {outputs_dict[key]}") + idx += 1 for key in outputs_dict: eprint(key, outputs_dict[key]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-displays-0.3.16/setup.py new/nwg-displays-0.3.20/setup.py --- old/nwg-displays-0.3.16/setup.py 2024-03-21 01:41:12.000000000 +0100 +++ new/nwg-displays-0.3.20/setup.py 2024-05-30 00:47:59.000000000 +0200 @@ -9,7 +9,7 @@ setup( name='nwg-displays', - version='0.3.16', + version='0.3.20', description='nwg-shell output configuration utility', packages=find_packages(), include_package_data=True,