Skip to content

How to create a bat file that changes the background? #1633

Answered by rocksdanister
Jackgito asked this question in Q&A
Discussion options

You must be logged in to vote

https://github.com/Jackgito/DynamicLivelyWallpaper

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:\\

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@Jackgito
Comment options

Comment options

You must be logged in to vote
4 replies
@Jackgito
Comment options

@rocksdanister
Comment options

@rocksdanister
Comment options

@Jackgito
Comment options

Answer selected by rocksdanister
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants