Merge pull request #50 from nikolaizombie1/fix-hyprpaper-unload-bug

fix: Hyprpaper would unload wallpaper before being applied.
This commit is contained in:
Roman 2024-05-25 07:16:50 +09:00 committed by GitHub
commit b25a5fbac5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,11 +97,9 @@ def change_wallpaper(image_path, cf, monitor, txt):
monitor = ""
wallpaper_command = ["hyprctl", "hyprpaper", "wallpaper", f"{monitor},{image_path}"]
unload_command = ["hyprctl", "hyprpaper", "unload", "all"]
subprocess.Popen(preload_command)
time.sleep(0.1)
subprocess.Popen(wallpaper_command)
time.sleep(0.1)
subprocess.Popen(unload_command)
subprocess.Popen(preload_command)
subprocess.Popen(wallpaper_command)
elif cf.backend == "none":
pass