From 8ddec65c30d9e7c7d604b221b154ecd617bc01c2 Mon Sep 17 00:00:00 2001 From: Roman Date: Sun, 3 Mar 2024 18:50:13 +0100 Subject: [PATCH] Fix space in the path for post command This fixes #36 --- waypaper/changer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waypaper/changer.py b/waypaper/changer.py index 9c76b79..92f7f21 100644 --- a/waypaper/changer.py +++ b/waypaper/changer.py @@ -92,7 +92,7 @@ def change_wallpaper(image_path, cf, monitor, txt): command = cf.post_command.split(" ") for index, word in enumerate(command): if word == "$wallpaper": - command[index] = image_path + command[index] = image_path.replace(" ", "\\ ") subprocess.Popen(f'{" ".join(command)}', shell=True).wait() print(f'Post command {" ".join(command)} executed')