Skip to content

yangman946/WallPaperChanger

Repository files navigation

WallPaperChanger 🖼️


wallpaper


Description ⛈️

WallPaperChanger is a Python script that changes your desktop wallpaper according to your current time and weather.

Features

  • Images API - new and unique wallpaper every time
  • Weather API - changes wallpaper depending on weather (rain/mist/clear/thunder) and time (sunrise/day/sunset/night)
  • Weather widget - Shows weather forecast
  • Displayed time and date + refreshable clock

Cloning 🌀

$ git clone https://github.com/yangman946/WallPaperChanger

Running ⚡

You need:

Alternatively you can choose to run WallPaperChanger offline with a selection of default wallpapers.

Refer to settings.py for where to insert these values.


You can run this script in two ways:

Via the run.bat batch script

You can either run the script manually or via a task scheduler to run it periodically (i.e., every hour). Make sure to edit the run.bat script to add the directory for which the batch script is located. A premade windows task scheduler xml file is provided in the project root.

You may also decide to run the refresh.bat script every minute to update the live clock.

Via the command-line

  • Open the project in your terminal of choice (or use cd to move to the project root)

  • Run the app using the following command.

    python -m wallpaperChanger

Miscellaneous 🧑‍💻

Batch files

Various batch files have been included with this project:

  • run.bat - changes the wallpaper, can be run from a task scheduler
  • refresh.bat - only changes the clock at the bottom right of the wallpaper
  • dislike.bat - can add the wallpaper to blacklisted_wallpapers.txt, effectively removing it from ever being seen

You can create desktop shortcuts to these batch files for quick and easy access.

Offline Only

You will find separate folders for each weather condition (day/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

Customising layouts

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:

  1. Coordinates of your widget (x, y)
  2. Day/date text location ("x", "y")
    • "x": left, center or right
    • "y": top, center or bottom
  3. show water mark (true, false)
  4. show compile time (true, false)
  5. Compile time location ("x", "y")
    • "x": left, center or right
    • "y": top, center or bottom
  6. 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 review it ASAP. Here’s an easy and quick video guide for learning how to contribute via GitHub.

About

Changes your desktop wallpaper based on the weather.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published