Skip to content

JWalk9000/refind-bg-setter

Repository files navigation

rEFInd BG Setter

A tool for setting rEFInd bootloader backgrounds. Use it by it's self, or integrate it with with your Wallpaper setter.

Features

  • Qt dialog for selecting and saving all options (wallpaper, overlay, blur, output location, etc.)
  • Option to run fully automated with no GUI (set gui_options: false in YAML)
  • Automatic compositing of wallpaper and overlay with optional blur
  • All settings saved and loaded from a YAML config file
  • Output directory, filename, and overlay image are fully user-configurable
  • Installer script for easy setup on Arch Linux
  • Privilege escalation for EFI partition updates using pkexec
  • Modular, maintainable code structure

Usage

Clone the repo do your desired location:

git clone https://github.com/JWalk9000/refind-bg-setter.git /path/to/your/local/directory

Run the installer to set up dependencies:

./install.sh

Launch from CLI:

refind-bg-setter /path/to/wallpaper.png
  • Set your options in the dialog (or disable the dialog for automation).
  • The script will process your wallpaper and overlay, and update rEFInd's background.

Add to Waypaper post_command, for instance with Pywal:

post_command = wal -i $wallpaper -n && refind-bg-setter $wallpaper

To automate or use with the same settings every time,

  • Set gui_options: false in ~/.config/refind_wallpaper_options.yaml.

Supported Image Formats

This tool supports any image format that ImageMagick can read as input. This includes, but is not limited to:

  • PNG (.png)
  • JPEG (.jpg, .jpeg)
  • WebP (.webp)
  • BMP (.bmp)
  • TIFF (.tiff)
  • GIF (.gif)

You can use any of these formats for your source wallpaper image. The output for rEFInd will always be a PNG, as required by rEFInd.

Overlay Image Format

The overlay image can also be any format supported by ImageMagick, as long as it supports transparency (alpha channel). PNG is recommended for overlays with transparency. See the included example-overlay.png for a working example.

Planned Improvements if others find this useful

1. User Interface Improvements

  • Add a window icon and app name.
  • Use file picker dialogs for overlay image and output directory.
  • Validate paths and filenames before accepting.
  • Add tooltips or help icons for each option.
  • integrate with system theming.

2. User Experience

  • Show error or success popups for invalid input or after completion.
  • Remember window size and position.
  • Add a preview of the selected wallpaper and overlay.

3. Code/Structure

  • Further modularize code and add more comments/docstrings.
  • Add logging for errors.

4. Packaging

  • Add a .desktop file for menu launching.
  • Add more detailed documentation and screenshots.

Feel free to contribute or adapt for your own needs/wants.

About

Set rEFInd background image from a wallpaper image with optional blur, and an overlay image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published