/wally

add texts to your wallpaper

Primary LanguagePython

Readme

wally is a Python script that reads text from a file and adds the text to an image. The resulting image is then set as the wallpaper. The script can be run as a daemon service, so that the wallpaper is updated automatically when the text file is saved.

Something like this

./assets/sample.jpg

At the moment, I use `grepy` to fetch five GRE words each day and save them in the `words.txt` file. This file is then used to show the text on the wallpaper.

grepy A very simple python script to get (GRE) word for today

./assets/7mzd1v.jpg

Note

This project was created with the help of ChatGPT, a language model trained by OpenAI. Even this Readme.

Prerequisites

  • Python 3.10.1
  • systemd (for running the script as a daemon service)

Installation

  1. Install Python 3.6 or higher, if not already installed.
  2. Clone this repository to your local machine:
git clone https://github.com/utsavdarlami/wally.git
  1. Navigate to the `wallpaper-updater` directory:
cd wallpaper-updater
  1. Install the package using pip from requirements.txt:
pip install -r requirements.txt 
  1. Edit the `config.ini` file to specify the path to the text file and the image file, and other settings as needed.
  2. If you want to run the script as a daemon service, copy the `wallpaper_updater.service`(inside `assets`) file to `~/.config/systemd/user/` and run the following commands:
systemctl --user daemon-reload
systemctl --user start wallpaper_updater.service
systemctl --user enable wallpaper_updater.service

Usage

To run the script manually, simply run the following command:

python wallpaper_updater.py

If you have set up the script as a daemon service, it will run automatically in the background.

Configuration

The `config.ini` file contains the following settings:

  • `text_file`: the path to the text file.
  • `image_file`: the path to the image file.
  • `font_file`: the path to the font file (optional).
  • `font_size`: the size of the font (optional).
  • `font_color`: the color of the text (optional).

You can customize these settings to your liking.