WallPaperChanger
WallPaperChanger copied to clipboard
Changes your desktop wallpaper based on the weather.
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 - Your own api key for openweather: https://openweathermap.org/api
- (Optional) Image url for weather widget: customise your own widget here: https://www.theweather.com/
refer to mainScript.py for where to insert these values.
You can run this script two ways:
Via the run.bat script
You can either run the file normally or use the windows task scheduler to run it periodically. A premade windows task scheduler xml file is provided in the project root.
Via the command-line
-
Open the project in your terminal of choice (or use
cdto move to the project root) -
Run the app using the following command.
python -m wallpaperChanger
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
- "x": left, center or right
- "y": top, center or bottom
- 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.