Skip to content

Instantly share code, notes, and snippets.

@mda590
Last active April 1, 2019 10:06
Show Gist options
  • Save mda590/70b0ee43d2b03c90eb7696638d3a3570 to your computer and use it in GitHub Desktop.
Save mda590/70b0ee43d2b03c90eb7696638d3a3570 to your computer and use it in GitHub Desktop.
Gets the latest Gradient Wallpaper from Wallcat and sets it as active - run as a scheduled task
$curr_chan = "ygmTdEW7aF"
$curr_date = Get-Date -format "yyyy-MM-dd"
$wallpaper_json = (wget "https://beta.wall.cat/api/v1/channels/${curr_chan}/image/${curr_date}T00:00:00.000Z").Content | ConvertFrom-Json
$wallpaper_url = $wallpaper_json.payload.image.url.o
$wallpaper_local_path = (Get-ItemProperty -path 'HKCU:\Control Panel\Desktop').WallPaper
Invoke-WebRequest $wallpaper_url -OutFile $wallpaper_local_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment