From f8b405617cec920779fa6b2237276115c94a1a6e Mon Sep 17 00:00:00 2001 From: CalfMoon Date: Tue, 30 Apr 2024 10:19:07 +0545 Subject: [PATCH] fix: remove swww deprecation warning The usage of swww init instead of swww-daemon was causing a deprecation warning to appear "DEPRECATION WARNING: `swww init` IS DEPRECATED. Call `swww-daemon` directly instead". `swww init` was depricated in version 0.9.0 of swww but `swww-daemon` was added back in version 0.7.0. This fixes issue #39 --- waypaper/app.py | 2 +- waypaper/changer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/waypaper/app.py b/waypaper/app.py index bcd921d..81b8b8e 100644 --- a/waypaper/app.py +++ b/waypaper/app.py @@ -200,7 +200,7 @@ class App(Gtk.Window): # Check available monitors: monitor_names = ["All"] try: - subprocess.Popen(["swww", "init"]) + subprocess.Popen(["swww-daemon"]) query_output = str(subprocess.check_output(["swww", "query"], encoding='utf-8')) monitors = query_output.split("\n") for monitor in monitors[:-1]: diff --git a/waypaper/changer.py b/waypaper/changer.py index ae68ca3..2fa2d67 100644 --- a/waypaper/changer.py +++ b/waypaper/changer.py @@ -42,7 +42,7 @@ def change_wallpaper(image_path, cf, monitor, txt): time.sleep(0.005) except Exception as e: print(f"{txt.err_kill} {e}") - subprocess.Popen(["swww", "init"]) + subprocess.Popen(["swww-daemon"]) command = ["swww", "img", image_path] command.extend(["--resize", fill]) command.extend(["--fill-color", cf.color])