A small Windows tray app that puts random wallhaven.cc wallpapers on your desktop. It sits in the notification area, changes the wallpaper on demand or on a schedule, and keeps out of the way while you are doing something else.
Grab WallpaperChanger.exe from the latest
release and run it - there is no
installer. It is a single self-contained 64-bit executable that links the C runtime statically, so
it needs no Visual C++ redistributable and no other files. Settings are created on first run.
To have it start with Windows, tick Start with Windows on the Schedule tab rather than copying it anywhere in particular; the Run entry points at wherever you keep the exe.
Right-click the tray icon:
| Item | What it does |
|---|---|
| Next wallpaper | Fetch and set a new one. Double-clicking the tray icon does the same. |
| More like this one | Ask wallhaven for wallpapers similar to the current one. |
| Previous wallpaper | Go back one step. |
| History | Go back further, with a preview of each. |
| More with tag... | Follow one of the current wallpaper's tags to find more like it. |
| Save this one | Copy the current wallpaper to your save folder. |
| Save this one as... | Copy it somewhere you pick. |
| Never show this again | Blocklist it and move on. |
| Block tag or uploader... | Blocklist a whole tag, or everything from one uploader. |
| Open on Wallhaven | Open the wallpaper's page in your browser. |
| Profile | Switch between saved searches. |
| Pause automatic changes | Hold the schedule until you unpause. |
Settings has six tabs: Source, Search, Schedule, Wallpaper, Profiles and Blocklist.
Pick one on the Source tab:
- Wallhaven search - the query, categories, purity, aspect ratio and sorting on the Search tab.
- A collection - one of your own wallhaven collections. Wallhaven has no API for looking up your own user name, so you have to type it, then press Load. Collections ignore every filter except purity.
- A folder on this PC - any folder of images. These are used where they are and are never moved, copied or deleted.
An API key (Settings -> Search) is only needed for collections and for NSFW purity. It is stored in plain text in the settings file, so treat it like any other saved credential.
NSFW stays greyed out until a key is entered, and a key is checked against wallhaven when you type a new one, so a typo is caught there rather than turning up later as a failed change. If the check cannot be made at all - no connection, rate limited - your settings still save. Wallhaven answers 401 to any request carrying a key it refuses, so a key that is later revoked would otherwise break even plain SFW searching; where the key is not needed the request is retried without it and you are told once that it needs replacing.
A new install searches the General category at SFW purity only. Sketchy content asks for confirmation before it is switched on, and NSFW needs an API key, because wallhaven does not serve it to guests at all.
Automatic changes are skipped while a game or presentation is fullscreen, while notifications are silenced, and - if you ask - on battery or below a battery threshold. Non-SFW results can be held back while you are presenting, so a scheduled change cannot surprise you in front of an audience. Anything you trigger yourself always goes ahead.
- Prefetch downloads the next wallpaper in the background, so a change is usually well under a second. It is discarded if you change the filters.
- Per-monitor wallpapers give each screen its own image, at the cost of one download per screen.
- Lock screen: setting it turns Windows Spotlight off, which is why it is opt-in.
- Accent colour matching uses private Windows entry points, so it may stop working after a Windows update. Your original accent is saved when you switch it on and restored when you switch it off.
- Only the images in your history are kept, in
%TEMP%; older ones are deleted. Images from a local folder are never touched.
Settings live in %APPDATA%\WallpaperChanger\settings.json.
Open WallpaperChanger.sln in Visual Studio and build, or from a Developer Command Prompt:
msbuild WallpaperChanger.sln /p:Configuration=Release /p:Platform=x64
The result is x64\Release\WallpaperChanger.exe. Add /t:Rebuild to build from scratch, and
/m to use all cores:
msbuild WallpaperChanger.sln /p:Configuration=Release /p:Platform=x64 /t:Rebuild /m
If msbuild is not on your PATH, either use the Developer Command Prompt for VS or call it by
full path - vswhere will find it:
for /f "usebackq tokens=*" %m in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) do "%m" WallpaperChanger.sln /p:Configuration=Release /p:Platform=x64
Needs the v145 toolset and the Windows 10/11 SDK. There are no external dependencies to fetch:
nlohmann/json is vendored under third_party/. The Release
configuration links the C runtime statically (/MT), so the built exe runs on a machine without
the Visual C++ redistributable.
| File | Contains |
|---|---|
WallpaperChanger.cpp |
Tray icon, menu, and what happens when a wallpaper changes |
Wallhaven.cpp |
The wallhaven API client |
Wallpaper.cpp |
Setting the wallpaper, including per-monitor, via IDesktopWallpaper |
Settings.cpp |
Settings, profiles and history, persisted as JSON |
SettingsDialog.cpp |
The settings property sheet |
LockScreen.cpp |
Lock screen, through the raw WinRT ABI |
Accent.cpp |
Accent colour, with snapshot and restore |
MenuBitmap.cpp |
Decoding thumbnails for the menu, via WIC |
The vendored third_party/nlohmann/json.hpp is MIT licensed; see the header for details.