t1m0thyj / WinDynamicDesktop

Port of macOS Mojave Dynamic Desktop feature to Windows

Home Page:https://windd.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

accurate to one hour

policx opened this issue · comments

commented

I have prepared 24 wallpapers, and I want to have corresponding wallpapers for each hour precisely. Can this function be added? Thank you very much.

If you want to schedule a new wallpaper for each hour of the day, this capability is built into Windows so you shouldn't need to install an app like WinDD. See https://superuser.com/a/1492746/517562

commented

Firstly, thank you very much for your answer. I ultimately chose to use powershell in conjunction with Windows scheduled tasks

# Define the wallpaper folder path
$wallpaperFolder = "D:\Images\jokul"

# Map the wallpaper filename with the hour number, simplifying the process by directly constructing the file path
$currentHour = Get-Date -Format "HH"
$wallpaperFile = "$wallpaperFolder\jokul_1$currentHour`.jpg"

# Check if the wallpaper file exists
if (-not (Test-Path $wallpaperFile)) {
    Write-Host "Wallpaper file not found: $($wallpaperFile)"
    exit
}

# Set the registry entry to change the wallpaper
$key = 'HKCU:\Control Panel\Desktop'
Set-ItemProperty -Path $key -Name Wallpaper -Value $wallpaperFile -Type String
RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters

Write-Host "Wallpaper set successfully."

Thanks for sharing your solution 🙂 It should be helpful for anyone else who wants to have an hourly slideshow and finds the built-in capabilities of Windows lacking. Closing as completed, since this is outside the scope of planned features for WinDD.