Dynamic Wallpaper automatically changes your desktop wallpaper based on your weather!
Dynamic Wallpaper fetches weather condition details using OpenWeatherMap API.
Then searches for wallpaper images related to the weather condition through Unsplash API, downloads an image and applies it as wallpaper.
It checks for weather updates every 5 minutes.
- Python 3
- Pip (Python's Package Manager)
- First, clone the repository.
git clone https://github.com/daspartho/dynamic-wallpaper.git
- Then, change your current directory into the dynamic-wallpaper repository.
cd dynamic-wallpaper
- Finally, install the requirements in the requirements file.
pip install -r requirements.txt
- From here, dynamic-wallpaper is installed. Continue to the Setting Up section in order to connect dynamic-wallpaper to the APIs.
You need to do these only the first time.
- Create a
.env
file. - OpenWeatherMap API setup
- Go to https://home.openweathermap.org/users/sign_up and sign up.
- Now on the dashboard click on API keys option and copy the key given.
- Go to the
.env
file and paste the key like thisWEATHER_API_KEY=<your-key>
- Unsplash API setup
- Go to https://unsplash.com/join and sign up. Then go to Application dashboard from here https://unsplash.com/oauth/applications.
- Now on the dashboard click on 'New Application', accept the terms, fill in a cool name and description for the application (it doesn't matter what you put) and create an application.
- Then go to the keys section on the application dashboard and copy the Access Key (no need for secret key).
- Go to the
.env
file and paste the key like thisUNSPLASH_CLIENT_ID=<your-key>
⚠️ Please remember to never share your keys with anyone.
Run the script from a terminal using python main.py
in the local repository's directory (or probably by double-cliking on the main
python script from your file explorer on Windows).
Congratulations! You will now have beautiful wallpapers that changes according to weather.
If you want to contribute code, just write a quick pull request and the developers will take a look at it. If you want to suggest an idea, just write an issue and the developers will check it out!