This is a fork of https://github.com/timothymctim/Bing-wallpapers mainly to add MacOS support. Thanks for the project Tim!
- Supports MacOS and Linux execution using PowerShell on those platforms. While I haven't tested on Linux, it has worked on one user's machine. :-)
- Can use an alternate (unofficial) source of image metadata by
specifying
-useJsonSourceon the command line. The officialxmlendpoint supports the last 14 days. - A script (
update-imagemetadata.ps1) that uses ExifTool to update the image metadata in the source files to reflect the metadata in the feed. The images don't include them, strangely.- ExifTool is available for MacOS and Windows, but not Linux.
- This script uses the information in the JSON endpoint source.
- Renamed script and paramaters to be more vernacular PowerShell.
- Support for the
autoresolution detection on MacOS relies on the information returned fromsystem_profiler SPDisplaysDataTypeand with multiple displays this may provide a lower resolution than you may desire. Set$VerbsosePreference = 'Continue'to see diagnostic messages such as the screen resolution detected if you don't provide a preference. This seemed to occur in a dual monitor situation where the retina display in the laptop and is mirroring an external display. You may want to manually specify the resolution manually instead.
https://github.com/dabeastnet/PixelPoSH generates geometric desktop images using an SVG generator. Thanks for the tip James Brundage @ BlueSky check out his repos too.
This Windows PowerShell script automatically fetches the Bing image of the day. Using this script you can set the Bing image of the day as your wallpaper.
The script uses the XML page of Microsoft Bing to download the images. With a few extra steps, the script allows you to set your wallpaper to the Bing image of the day, just like using Bing desktop (which might be unavailable in your region or you do not want to install).
The script supports several options which allows you to customize the behavior.
-
-LocaleGet the Bing image of the day for this region.Possible values
'auto','ar-XA','bg-BG','cs-CZ','da-DK','de-AT','de-CH','de-DE','el-GR','en-AU','en-CA','en-GB','en-ID','en-IE','en-IN','en-MY','en-NZ','en-PH','en-SG','en-US','en-XA','en-ZA','es-AR','es-CL','es-ES','es-MX','es-US','es-XL','et-EE','fi-FI','fr-BE','fr-CA','fr-CH','fr-FR','he-IL','hr-HR','hu-HU','it-IT','ja-JP','ko-KR','lt-LT','lv-LV','nb-NO','nl-BE','nl-NL','pl-PL','pt-BR','pt-PT','ro-RO','ru-RU','sk-SK','sl-SL','sv-SE','th-TH','tr-TR','uk-UA','zh-CN','zh-HK','zh-TW'Default value
'auto'Remarks By using the value
'auto', Bing will attempt to determine an applicable locale based on your IP address.Currently, only the values
'de-DE','en-AU','en-CA','en-GB','en-IN','en-US','fr-CA','fr-FR','ja-JP', and'zh-CN'will have their own localized version. Other values will be considered as the “Rest of the World” by Bing. -
-filesKeep only this number of images in the folder, any other file matching????-??-??.jpgwill be removed!Default value
3Remarks Setting this option to
0will keep all images and will not remove any file. -
-ResolutionDetermines which image resolution will be downloaded. If set to'auto'the script will try to determine which resolution is more appropriate based on your primary screen resolution.Possible values
'auto','800x600','1024x768','1280x720','1280x768','1366x768','1920x1080','1920x1200','720x1280','768x1024','768x1280','768x1366','1080x1920','UHD'Default value
'auto' -
-PathDestination folder to download the wallpapers to.Default value
"$([Environment]::GetFolderPath("MyPictures"))\Wallpapers"(the subfolderWallpapersinside your default Pictures folder)Remarks The folder will automatically be created if it doesn’t exist already.
-
-DeleteRemoves images not in the most recent download.Default Value Not used
Remarks If specified then all images in folder are sorted and only the most recent $count are kept and all others are deleted.
-
-FromAlternativeSourceUse an unofficial source for wallpaper information.Default Value Not used.
Remarks The unofficial endpoint contains a history that is longer than the offical endpoint (which is capped at 15 most recent images).
With a few additional steps you’re able to automatically download the latest images and set them as your wallpaper.
First, make sure that you can actually run PowerShell scripts.
You might have to set the execution policy to unrestricted by running
Set-ExecutionPolicy Unrestricted in a PowerShell window executed with
administrator rights.
Additionally, you might need to unblock the file since you downloaded
the file from an untrusted source on the Internet.
You can do this by running Unblock-File <path to the script> as
administrator.
Note that the script itself doesn’t need to be run as administrator!
You can configure to run the script periodically using “Task Scheduler.”
Open Task Scheduler and click Action ⇨ Create Task….
Enter a name and description that you like.
Next, add a trigger to run the task once a day.
Finally, add the script as an action.
Run the program powershell with the arguments -WindowStyle Hidden -file "<path to the script>" <optional script arguments>.
Go to Settings ⇨ Personalization ⇨ Background and select
Slideshow as the Background type.
Hit the Browse button to select the folder you automatically download
the images to (the default is the folder Wallpapers inside your
Pictures folder).