RaccoonLaptopGif

Wallpaper Changer

The Wallpaper Changer is a Python program that allows you to automatically change your desktop wallpaper using random images from the Wallhaven API. You can also set a hotkey combination to manually trigger the wallpaper change.

Features

Installation

To run the Wallpaper Changer program, follow these steps:

  1. Install Python: Make sure you have Python installed on your system. You can download the latest version of Python from the official website: python.org.

  2. Install the required packages: Open a terminal or command prompt and navigate to the directory containing the program files. Run the following command to install the necessary packages:

pip install requests pillow keyboard

  1. Obtain a Wallhaven API key: Visit the Wallhaven API page and follow the instructions to obtain an API key. Note down the API key for later use.

  2. Download the program files: Download the program files from the repository or copy the provided code into a file with the .py extension.

  3. Create a configuration file: Create a new file named config.py in the same directory as the program files. Open the config.py file in a text editor and define the following variables:

Save the config.py file after defining the variables.

Usage

  1. Run the program: Open a terminal or command prompt and navigate to the directory containing the program files. Run the following command to execute the program:

python main.py

The program will start running and retrieve a random wallpaper from the Wallhaven API. It will then download and set the downloaded image as your desktop wallpaper.

  1. Manually change wallpaper: If you want to manually change the wallpaper, press the key combination defined in the KeyBind variable in the config.py file. The program will immediately fetch and set a new wallpaper based on the search query.

  2. Terminate the program: To stop the program, press Ctrl+C in the terminal or command prompt where the program is running.

Notes

‎ ‎