🖼️
WallPaperChanger
⛈️
Description This Python script changes your desktop wallpaper based on the weather.
🌀
Cloning $ git clone https://github.com/yangman946/WallPaperChanger
⚡
Running You need:
- install requirements:
pip install -r requirements.txt
- Image url for weather widget: customise your own widget here: https://www.theweather.com/
- Your own api key for openweather: https://openweathermap.org/api
refer to mainScript.py
for where to insert these values.
You can run this script two ways:
- Via the
run.bat
script - Change the first line with
%~dp0
to the file location ofmainScript.py
- and use Windows Task scheduler to periodically run the
run.bat
file. You could make the script run once every hour. - Or import the provided .xml file into task scheduler (change path to your batch file)
- or Via the command line
- CD to the file location of
mainScript.py
- run
python mainScript.py
- CD to the file location of
✏️
Customising Wallpapers Currently, the mainScript.py
script supports the following weather states:
- Clear
- Mist (cloudy)
- Rain
- and thunder
You will find separate pairs of folders for each weather condition (day and night). These folders contain jpeg images (3936x2624 pixels) each labeled from 1 to the number of images in the folder. If you wish to replace images, ensure that:
- The images are of correct size (recommended 3936x2624 pixels)
- The images are in the correct folders
- The images are properly labelled {weather state}_{day state}_{image index}
- The images are jpeg images
To customise the layout of the wallpaper, refer to the configurations
dictionary at mainScript.py
. Here, you can add custom layouts or use existing ones. Each layout requires six parameters:
- Coordinates of your widget (x, y)
- Day/date text location ("x", "y")
- "x": left, center or right
- "y": top, center or bottom
- show water mark (true, false)
- show compile time (true, false)
- Compile time location ("x", "y")
- "x": left, center or right
- "y": top, center or bottom
- Font
- Bold
- ExtraBold
- ExtraLight
- Italic
- Light
- Medium
- Regular
- Thin
- See all fonts
👍
Contributing If you wish to contribute to this project, send a pull request, and I will look at it. Here’s an easy and quick video guide for learning how to contribute via GitHub.
✔️
TODO List This project is a work in progress and will expect frequent updates.
- Expand wallpaper folders.
Add a sunrise/sunset API to change the daystate.- Add temperature conditions and assign certain wallpapers to temperature.
Make the program run without appearing (invisible)
✅
Possible future improvements - Find a wallpaper API, reduces need for having folders full of images
- Show news or other information along with the weather.
- Export as an executable
Make this project compatible with non-windows systems.