Last active
April 1, 2019 10:06
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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