diff --git a/x11/py-waypaper/Makefile b/x11/py-waypaper/Makefile index 10578bcf1e35..c5c875a31314 100644 --- a/x11/py-waypaper/Makefile +++ b/x11/py-waypaper/Makefile @@ -1,29 +1,29 @@ PORTNAME= waypaper DISTVERSION= 2.6 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= nivit@FreeBSD.org COMMENT= GUI wallpaper manager for Wayland and Xorg WWW= https://anufrievroman.gitbook.io/waypaper LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>=0.44.0:devel/py-wheel@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>=10.4.0:graphics/py-pillow@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}platformdirs>=4.2.2:devel/py-platformdirs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}imageio>=2.36.0:graphics/py-imageio@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}imageio-ffmpeg>=0.5.1:graphics/py-imageio-ffmpeg@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}screeninfo>=0.8.1:x11/py-screeninfo@${PY_FLAVOR} \ feh:graphics/feh \ swaybg:x11/swaybg USES= gnome python USE_GNOME= pygobject3:run USE_PYTHON= autoplist pep517 .include diff --git a/x11/py-waypaper/files/patch-waypaper_changer.py b/x11/py-waypaper/files/patch-waypaper_changer.py new file mode 100644 index 000000000000..c6994c8df161 --- /dev/null +++ b/x11/py-waypaper/files/patch-waypaper_changer.py @@ -0,0 +1,19 @@ +--- waypaper/changer.py.orig 2025-02-28 01:09:43 UTC ++++ waypaper/changer.py +@@ -138,9 +138,15 @@ def change_with_swww(image_path: Path, cf: Config, mon + subprocess.Popen(["swww-daemon"]) + print("Launched swww-daemon") + ++ version_p = subprocess.run(["swww", "-V"], capture_output=True, text=True) ++ swww_version = [int(x) for x in version_p.stdout.strip().split(" ")[1].split(".")] ++ + command = ["swww", "img", image_path] + command.extend(["--resize", fill]) +- command.extend(["--fill-color", cf.color]) ++ if swww_version >= [0, 11, 0]: ++ command.extend(["--fill-color", cf.color.lstrip("#")]) ++ else: ++ command.extend(["--fill-color", cf.color]) + command.extend(["--transition-type", cf.swww_transition_type]) + command.extend(["--transition-step", str(cf.swww_transition_step)]) + command.extend(["--transition-angle", str(cf.swww_transition_angle)]) diff --git a/x11/py-waypaper/pkg-descr b/x11/py-waypaper/pkg-descr index 966327b96590..a77889d00b57 100644 --- a/x11/py-waypaper/pkg-descr +++ b/x11/py-waypaper/pkg-descr @@ -1,14 +1,14 @@ GUI wallpaper setter for Wayland and Xorg window managers. It works as a frontend for popular wallpaper backends like swaybg, swww, wallutils, hyprpaper, mpvpaper and feh. Features - Vim keys - Support for GIF animations (with swww or mpvpaper) - Support for videos (with mpvpaper) - - Support for multiple monitors (with swww or swaybg or hyprpaper or mpvpaper) - - Works on Wayland (with swww or swaybg or hyprpaper or wallutils or mpvpaper) + - Support for multiple monitors (with swww, swaybg, hyprpaper or mpvpaper) + - Works on Wayland (with swww, swaybg, hyprpaper, wallutils or mpvpaper) - Works on Xorg (with feh or wallutils) - Restores wallpaper at launch of your WM - Caching for fast loading