Skip to main content

A CLI tool to fetch and set beautiful wallpapers from various sources.

Project description

💘WallCLI

Wall CLI

Welcome to the Wallpaper CLI Tool! This tool allows you to fetch and set beautiful wallpapers from various sources like Pexels, Unsplash, NASA APOD, and Reddit. You can also generate custom wallpapers using Stable Diffusion. The tool is designed to be user-friendly and highly customizable.

📑 Table of Contents

✨✅Samples of fetched and Generated Wallpapers:

1.) Query - Scenary

Wall 1

2.) Query - Spirituality

Wall 2

3.) Query - Ganga Arti

Wall3

4.) Query - Mountains

Wall 4

📂 Folder Structure

wallpaper-cli-tool/
├── src/
|   |---wallpapers/
|   |      |-- nature.jpg 
|   |      |-- sea.png 
|   |      |-- sea2.png 
│   ├── generator.py          # Custom wallpaper generation using Stable Diffusion
│   ├── main.py               # Main entry point for CLI
│   ├── nasa_apod_api.py      # Fetch wallpapers from NASA APOD
│   ├── pexels_api.py         # Fetch wallpapers from Pexels
│   ├── reddit_api.py         # Fetch wallpapers from Reddit
│   ├── tui.py                # Terminal User Interface
│   ├── tui_style.css         # Styles for TUI
│   ├── unsplash_api.py       # Fetch wallpapers from Unsplash
│   └── wallpaper_setter.py   # Set and manage wallpapers
├── requirements.txt          # Project dependencies
├── wallpaper_history.txt     # History of wallpapers
└── test images/              # Test images used in the project for referance
└── Wallpapers/               # Project Wallpapers for reference
└── README.md                 # Project documentation

🪶Features

✨ - Fetch wallpapers from multiple sources: Pexels, Unsplash, NASA APOD, and Reddit.

✨ - Terminal User Interface (TUI) for easy interaction. for normal PC or windows users

✨ - Generate custom wallpapers using Stable Diffusion.

✨ - Set wallpapers directly from the command line.

✨ - Maintain a history of wallpapers.

✨ - Fetch Previous and Next Wallpapers

✨ - Set custom resolution for wallpapers , according to your adaptive rate of windows for ex: 124×124 etc.

💻 Installation

  1. Clone the repository:
git clone https://github.com/Blacksujit/WallCLI.git
cd wallpaper-cli-tool
  1. Install the required dependencies:
pip install -r requirements.txt

🪴 Usage

🧑‍🔧🦾 Terminal User Interface (For Normal users non techies):

TUI Interface

Run the TUI:
python src/tui.py

Use the TUI to select predefined queries, enter custom queries, and fetch wallpapers.

🧑‍💻👩‍💻 Command Line Interface: (For techies)

🫴 navigate to:

cd src

🫴 Fetch and set a wallpaper from Pexels:

python main.py --set-wallpaper "hindu Spirituality" --orientation "landscape" --resolution "1920x1080" --monitor 0

🫴 Set Wallpaper from Various Sources like Reddit , unsplash , Nasa apod:

python main.py --set-wallpaper "A beautiful sunset" --source reddit
python main.py --set-wallpaper "A beautiful sunset" --source unsplash
IMP Note:

just in case of setting the wallpaers from nasa apod u have to specify the date instead of the query so it works on the geolocation engine , so it works as random sattelite wallpaper API

python main.py --set-wallpaper "2022-03-12" --source nasa

🫴 Set Previous used wallpaper:

python main.py --previous 2 --monitor 0

🫴 Generate a custom wallpaper:

python main.py --source custom --query "a beautiful sunset" --resolution "1024x1024"

🫴 Retrive the wallpaper History:

python main.py --list-history

🔑 API Keys

To use this tool, you need to set up API keys for the various services. Here are the steps to obtain and set the API keys:

first of all create an ``.env`` file at the root of your project

  1. Pexels API Key:

    • Sign up at Pexels.
    • Go to your profile and find the API key.
    • Set the API key in your environment variables:
      export PEXELS_API_KEY='your_pexels_api_key'
      
  2. Unsplash API Key:

    • Sign up at Unsplash.
    • Create a new application to get the API key.
    • Set the API key in your environment variables:
      export UNSPLASH_API_KEY='your_unsplash_api_key'
      
  3. NASA APOD API Key:

    • Sign up at NASA API.
    • Get the API key for APOD.
    • Set the API key in your environment variables:
      export NASA_API_KEY='your_nasa_api_key'
      
  4. Reddit API Key:

    • Create an application at Reddit Apps.
    • Get the client ID and secret.
    • Set the API key in your environment variables:
      export REDDIT_CLIENT_ID='your_reddit_client_id'
      export REDDIT_SECRET='your_reddit_secret'
      

🌱 Example Use Case

Imagine you want to refresh your desktop wallpaper every day with a new image of nature. You can set up a cron job (on Unix-based systems) or a scheduled task (on Windows) to run the following command daily:

python src/main.py --source pexels --query "nature" --orientation "landscape" --resolution "1920x1080"

This will automatically fetch a new nature wallpaper from Pexels and set it as your desktop background.

🎮 Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

🪪 License

This project is licensed under the MIT License.

Enjoy your new wallpapers!!!

Enjoy ur Wallpapers !!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wallpaper_cli_tool-1.0.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wallpaper_cli_tool-1.0.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file wallpaper_cli_tool-1.0.0.tar.gz.

File metadata

  • Download URL: wallpaper_cli_tool-1.0.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for wallpaper_cli_tool-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d57f0ee0ed14ff64e036ab802237e7f21dace3aaa4932cd369b1e6aba0063e26
MD5 cd68690fb1f8b66dc8f17101bd7b17a3
BLAKE2b-256 081380f285bb622bb7e01985f976a5e9665e8ed929e4ab10890afe9feed0aba9

See more details on using hashes here.

File details

Details for the file wallpaper_cli_tool-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wallpaper_cli_tool-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d128ee1e2ba8421e309bffcdcbc72902cc5bab52396124e0cde57bf0567bdf1
MD5 f4c73fd9a5853388c0c626a8e19066fe
BLAKE2b-256 d5bd53be2fefe470a50c3ad88857f4781a723865e8182176cd7d9373d8a22e72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page