WeatherSyncBG dynamically updates your desktop wallpaper based on real-time weather conditions and seasonal changes. It works cross-platform on Windows, macOS, and Linux using OpenWeatherMap's API.
✅ Real-time Weather-Based Wallpapers – Changes your desktop wallpaper based on weather conditions like sunny, cloudy, rainy, snow, thunderstorms, and more.
✅ Severe Weather Alerts – Overrides wallpaper for tornadoes, winter storms, and floods.
✅ Seasonal Backgrounds – Defaults to seasonal wallpapers when no severe weather is detected.
✅ Cross-Platform Support – Works on Windows, macOS, and Linux.
✅ Automated Updates – Can be scheduled to update every hour.
- Windows: Already installed on Windows 11 or install from PowerShell GitHub
- macOS (Homebrew):
brew install --cask powershell
- Linux (Debian/Ubuntu):
sudo apt install -y powershell
- Linux (Fedora):
sudo dnf install -y powershell
git clone https://github.com/YOUR_USERNAME/WeatherSyncBG.git
cd WeatherSyncBG- Open
config.jsonin a text editor:nano config.json # or use VS Code, Vim, Notepad, etc. - Replace
"YOUR_OPENWEATHERMAP_API_KEY"with your OpenWeatherMap API key. - Set your ZIP code for location-based weather updates.
{
"apiKey": "YOUR_OPENWEATHERMAP_API_KEY",
"zipCode": "37301",
"country": "US"
}- Save and exit.
pwsh Set-WeatherWallpaper.ps1This will:
- Fetch the current weather based on your ZIP code.
- Choose the matching wallpaper.
- Update the desktop background accordingly.
To schedule the script to run every hour:
pwsh Setup-TaskScheduler.ps1This will create a scheduled task that runs the wallpaper update every hour when logged in.
To set up an hourly cron job:
chmod +x Setup-CronJob.sh
./Setup-CronJob.shThis will add a cron job that updates the wallpaper every hour.
| Weather Condition | Wallpaper File |
|---|---|
| Clear Sky | sunny.jpg |
| Clouds | cloudy.jpg |
| Rain/Drizzle | thunderstorm.jpg |
| Thunderstorm | thunderstorm.jpg |
| Snow | winter.jpg |
| Fog/Mist/Haze | cloudy.jpg |
| Tornado Warning | tornado.jpg |
| Winter Storm Alert | winterstorm.jpg |
| Flood Warning | flood.jpg |
| Default (Seasonal) | spring.jpg, summer.jpg, autumn.jpg, winter.jpg |
The provided wallpapers were created using a few simple AI-generated prompts to resemble my local region with mountains and farmland in a 16:9 aspect ratio. Feel free to replace them with your own custom images or tweak them to better fit your environment and aesthetic preferences.
- Sign up at OpenWeatherMap.
- Select One Call API 3.0 (Free plan provides 1,000 requests/day).
- Copy your API Key and paste it into
config.json.
- Windows users can extend the script to support multiple screens via DisplayFusion or
ActiveDesktop. - Linux users can modify the script to handle multi-monitor setups using
feh(for lightweight setups) ornitrogen.
- The script will default to seasonal wallpapers.
- Severe weather alerts will not override the wallpaper if API data is unavailable.
If you’d like to improve WeatherSyncBG, feel free to fork the repo and submit a pull request!
This project is licensed under the MIT License. See LICENSE for details.
Enjoy a weather-synced desktop with WeatherSyncBG! 🌤️🌩️🌨️🌪️