Changes your desktop wallpaper based on the weather.

Overview

WallPaperChanger 🖼️


wallpaper


Description ⛈️

This Python script changes your desktop wallpaper based on the weather.

Cloning 🌀

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

Running

You need:

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 of mainScript.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


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:

  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 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.


Comments
  • Watermark?

    Watermark?

    The watermark is not adding anything and is distracting (imo), I'd suggesting moving the date (in the middle) to the bottom right of the application. It could be shrunk and moved to a corner (maybe top right) where it would be much less inconspicuous.

    This is just a suggestion.

    opened by m-haisham 13
  • CurrentUrl = ??

    CurrentUrl = ??

    Hello,

    I am a beginner in Python and I changed the Url's but still my wallpaper isn't changing. i changed the pic_url and the api key (APIKEYOWM)

    but on the website there are lots of different url's for the CurrentUrl = ... so which one do I use ? are those 3 url's the only thing i need to change ?

    thanks and sorry if i asked a useless question (i am also learning english)

    opened by IIIDrSt0neIII 5
  • Separate wallpapers images from repository

    Separate wallpapers images from repository

    GitHub has a strict file limit of 100MB.

    My suggestion is to move the images to google drive (or any cloud storage service) and make the folder public. Then connecting to and downloading from the folder and implementing a caching mechanism.

    Caching mechanism will ensure that a single file will always be downloaded once.

    opened by m-haisham 2
  • Issue with task scheduler

    Issue with task scheduler

    I'm not sure why but I just cannot manage to get the task scheduler to run either the mainScript.py or the bat file. If I just run the program naturally using the mainScript.py or bat through an idle or file explorer, it runs just fine and the wallpaper changes successfully but when running the scheduler automatically or manually, it opens python for a slight second and closes without changes the desktop wallpaper. If maybe the program could be in an executable format such as an exe format, this might resolve the issue but I'm still not sure. scheduler

    opened by JordanLeich 2
  • Improved readme

    Improved readme

    1. Added emojis to each section
    2. Added a link for those who are new to GitHub and do not know how to contribute
    3. Changed each header size to make them look bigger and bolder
    opened by JordanLeich 1
  • Restructured and decoupled wallpapers better

    Restructured and decoupled wallpapers better

    • Restructured assets/wallpapers

      day
        - clear
        - mist
        - rain
        - thunder
      night
        - clear
        - mist
        - rain
        - thunder
      
    • Moved get-random-wallpaper to wallpapers.py

    opened by m-haisham 1
  • Add support for linux gnome

    Add support for linux gnome

    All wallpaper setting logic has been moved to wallpaper.py

    Wallpaper can be changed using the set_wallpaper(file) function exposed. The function changes depending on the operating system, so other scripts dont need to be aware which platform the system is running on.

    Usage is as simple as:

    from pathlib import Path
    from wallpaperChanger import wallpaper
    
    wallpaper.set_wallpaper(Path('path/to/file'))
    

    The function also checks if the specified file exists, if not found, raises FileNotFoundError

    opened by m-haisham 1
  • Added a task scheduler template

    Added a task scheduler template

    1. Added a .xml template file for those who want to import a task into their task scheduler. All you have to do is open task scheduler, click import task, open the .XML file and edit the location of the batch file in the actions tab. By default the task will run on user log in and will repeat every hour.
    opened by JordanLeich 1
  • Small reformatting and simplifying

    Small reformatting and simplifying

    1. Simplified many lines of code
    2. Improved formatting and indentation for comments that were too long for an idle
    3. Added many important file formats to avoid through GitHub with the .gitignore file
    opened by JordanLeich 1
  • Pathlib and restructuring

    Pathlib and restructuring

    I changed path handling from os module to the recommended pathlib package and restructured the package.

    .github
    assets
      - fonts
      - wallpapers
    generated
    wallpaperChanger
      - __init__.py
      - mainScript.py
      - settings.py
    .gitignore
    LICENSE
    README.md
    requirements.txt
    

    .github

    This folder contains all images that are solely used by github. For example, in README.md

    assets

    Contains external static assets that are used by the script

    generated

    Contains files that are generated by the script. Changes are ignored by version control as specified in .gitignore

    Conclusion

    Overall, There is no change to the functionality.

    opened by m-haisham 1
  • PEP 8 - Style

    PEP 8 - Style

    Noticed that you were not following the python style guidelines.

    The essentials are:

    Variables, function/method, python file and module names should be in snake_case.

    And constants in SCREAMING_SNAKE_CASE.

    If you have no intention of changing the style, feel free to close the issue.

    opened by m-haisham 1
  • Use configuration file instead of .env

    Use configuration file instead of .env

    A configuration file would allow for far more control over settings without directly changing the code.

    Most commonly used file formats are:

    • .ini
    • .json
    • .yaml
    • .xml

    I personally prefer .yaml as I find it most readable.

    opened by m-haisham 1
  • Remove image size restriction

    Remove image size restriction

    Currently, the application has a self-imposed dimensions on what images can be used. This is not ideal, so far the changes needed I have identified are the following.

    • Positioning the widget and the day text using percentages and padding
    opened by m-haisham 2
Owner
Clarence Yang
Clarence Yang
Wallpaper API from wallpaperscraft.com

wallpaper-api Wallpaper API from https://wallpaperscraft.com for API documentation see https://maajid-wallpaper-api.deta.dev/docs How to Run first, cl

Athallah Muhammad Maajid 2 Apr 6, 2022
Visual Weather api. Returns beautiful pictures with the current weather.

VWapi Visual Weather api. Returns beautiful pictures with the current weather. Installation: sudo apt update -y && sudo apt upgrade -y sudo apt instal

Hotaru 33 Nov 13, 2022
Design and build a wrapper for the Open Weather API current weather data service

Design and build a wrapper for the Open Weather API current weather data service that returns a city's temperature, with caching, also allowing for the temperature of the latest queried cities that are still validly cached to be retrieved.

Duan Rafael Ribeiro 1 Jun 27, 2022
Insane Weather Bot is here! Give suggestions, fork, and do much more to help us enhance the abilities of Insane Weather Bot.

Insane_Weather_Bot Insane Weather Bot is here! Give suggestions, fork, and do much more to help us enhance the abilities of Insane Weather Bot. Weathe

null 1 Jan 2, 2022
Weather Tracker, made with Python using Open Weather API

Weather Tracker Weather Tracker, made with Python using Open Weather API

Sahil Kumar 1 Feb 7, 2022
Library to manage your own custom RPC on your desktop

Info I don't recommend novices setting this up yourself. It requires Redis, a server to host the API on, and a bit of understanding of Windows & Pytho

Isaac K 1 Apr 16, 2022
A self-bot for discord, written in Python, which will send you notifications to your desktop if it detects an intruder on your discord server

A self-bot for discord, written in Python, which will send you notifications to your desktop if it detects an intruder on your discord server

LevPrav 1 Jan 11, 2022
This project checks the weather in the next 12 hours and sends an SMS to your phone number if it's going to rain to remind you to take your umbrella.

RainAlert-Request-Twilio This project checks the weather in the next 12 hours and sends an SMS to your phone number if it's going to rain to remind yo

null 9 Apr 15, 2022
Get informed when your DeFI Earn CRO Validator is jailed or changes the commission rate.

CRO-DeFi-Warner Intro CRO-DeFi-Warner can be used to notify you when a validator changes the commission rate or gets jailed. It can also notify you wh

null 5 May 16, 2022
Automatically changes your discord status

Automatically changes your discord status, Be careful as this may get you rate limited and banned

octo 5 Sep 20, 2022
This script will detect changes in your session using Discords built in Gateway.

Detect Session Gateway This script will detect changes in your session using Discords built in Gateway. What does this log? Discord build version Oper

Omega 5 Dec 18, 2021
A simple program to display current playing from Spotify app on your desktop

WallSpot A simple program to display current playing from Spotify app on your desktop How to Use: Linux: Currently Supports GNOME and KDE. If you want

Nannan 4 Feb 19, 2022
Changes the Telegram bio, profile picture, first and last name to the song that the user is currently listening to.

TGBIOFY - Telegram & Spotify integration Changes the Telegram bio, profile picture, first and last name to the song that the user is currently listeni

elpideus 26 Dec 7, 2022
Automatically detect changes made to the official Telegram sites.

?? Telegram Web Crawler This project is developed to automatically detect changes made to the official Telegram sites. This is necessary for anticipat

Il'ya 115 Dec 31, 2022
Due to changes to the discord API and discord.py being discontinued

Talia Due to changes to the discord API and discord.py being discontinued, Talia development has been halted permanently A customizable economy discor

null 2 Mar 8, 2022
Automatically commits and pushes changes from a specified directory to remote repository

autopush a simple python program that checks a directory for updates and automatically commits any updated files (and optionally pushes them) installa

carreb 1 Jan 16, 2022
A simple script that loads and hot-reloads cogs when you save any changes

DiscordBot-HotReload A simple script that loads and hot-reloads cogs when you save any changes Usage @bot.event async def on_ready(): from HotRelo

null 2 Jan 14, 2022
PR Changes Matrix Builder

Pr-changes-matrix-builder - A Github Action that will output a variable to be used in a matrix strategy job based on a PR&'s changes

Kyle James Walker (he/him) 21 Oct 4, 2022
Lambda-function - Python codes that allow notification of changes made to some services using the AWS Lambda Function

AWS Lambda Function This repository contains python codes that allow notificatio

Elif Apaydın 3 Feb 11, 2022