How to create a bat file that changes the background? #1633
-
Context: I am trying to create a Python script that changes the wallpaper based on the time of day by executing a bat file. I made a bat file that was supposed to change the background, but nothing happened. Here are the commands I tried: livelycu.exe setwp --file "C:\Users\Juise\Desktop\Jutut\Koodi\Dynamic wallpaper[day.mov](https://day.mov/)" livelycu.exe setwp --file "day.mov" However I did manage to change the wallpaper hue with the bat file, so I don't know why the background doesn't change. Any help is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Can you create a repository with the python and bat file code? |
Beta Was this translation helpful? Give feedback.
-
I was hoping to see code directly to send pull request 😅 Looks like import is broken now, can only set wallpapers already in gallery. Here is a working python code that run the commands directly without bat files, place Livelycu.exe in the same folder: import subprocess
def changeProperty(name, value, monitor):
runCommand(['setprop', f'--monitor={monitor}', f'--property={name}={value}'])
return;
def setWallpaper(path, monitor):
runCommand(['setwp', f'--monitor={monitor}', f'--file={path}'])
return;
def runCommand(args):
subprocess.run(['Livelycu'] + args)
print(['Livelycu'] + args)
return;
setWallpaper('D:\\test\\test clip.mp4', 1)
#changeProperty('hue', 30, 1) Since import is broken |
Beta Was this translation helpful? Give feedback.
I was hoping to see code directly to send pull request 😅
Looks like import is broken now, can only set wallpapers already in gallery.
Here is a working python code that run the commands directly without bat files, place Livelycu.exe in the same folder: