aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicola Vitale <nivit@FreeBSD.org>2025-09-25 17:23:35 +0200
committerNicola Vitale <nivit@FreeBSD.org>2025-09-25 17:35:38 +0200
commite4af422f432a1d3ad8babbce27378b7bfa98fd96 (patch)
tree3d1234201af19adbf82ee4c5debaf79de2913acf
parent92b470b0a9c205b655fff295c54964f65a2d8822 (diff)
x11/py-waypaper: Add a patch for operating with swww v. 0.11.X
- Add a patch to fix the option --fill-color sent to swww, which was changed in version 0.11.0 (of that program). See https://github.com/anufrievroman/waypaper/issues/183 and https://github.com/LGFae/swww/releases/tag/v0.11.0 - Pet portlint (lines too long in pkg-descr) - Bump PORTREVISION
-rw-r--r--x11/py-waypaper/Makefile2
-rw-r--r--x11/py-waypaper/files/patch-waypaper_changer.py19
-rw-r--r--x11/py-waypaper/pkg-descr4
3 files changed, 22 insertions, 3 deletions
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,6 +1,6 @@
PORTNAME= waypaper
DISTVERSION= 2.6
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
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
@@ -7,8 +7,8 @@ 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