mirror of
https://github.com/anufrievroman/waypaper.git
synced 2024-08-16 11:40:44 +03:00
Kill hyprpaper deamon on swww
Kill the hyprpaper deamon if we switched to swww to avoid the conflict. Discussed in #7
This commit is contained in:
parent
b066d4e162
commit
839dd839e2
@ -34,12 +34,15 @@ def change_wallpaper(image_path, cf, monitor, txt):
|
|||||||
"tile": "no",
|
"tile": "no",
|
||||||
}
|
}
|
||||||
fill = fill_types[cf.fill_option.lower()]
|
fill = fill_types[cf.fill_option.lower()]
|
||||||
if "swaybg" in cf.installed_backends:
|
try:
|
||||||
try:
|
if "swaybg" in cf.installed_backends:
|
||||||
subprocess.Popen(["killall", "swaybg"])
|
subprocess.Popen(["killall", "swaybg"])
|
||||||
time.sleep(0.005)
|
time.sleep(0.005)
|
||||||
except Exception as e:
|
if "hyprpaper" in cf.installed_backends:
|
||||||
print(f"{txt.err_kill} {e}")
|
subprocess.Popen(["killall", "hyprpaper"])
|
||||||
|
time.sleep(0.005)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"{txt.err_kill} {e}")
|
||||||
subprocess.Popen(["swww-daemon"])
|
subprocess.Popen(["swww-daemon"])
|
||||||
command = ["swww", "img", image_path]
|
command = ["swww", "img", image_path]
|
||||||
command.extend(["--resize", fill])
|
command.extend(["--resize", fill])
|
||||||
|
Loading…
Reference in New Issue
Block a user