Skip to content

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

29 Commits

Folders and files

Repository files navigation

HyprWpE: Wallpaper Engine For Hyprland

A script-based solution with a full-featured GUI to bring Wallpaper Engine's video, web, and scene wallpapers to the Hyprland compositor on Wayland.

This project provides a set of scripts and a GTK4 graphical interface to find, configure, and display wallpapers from your existing Steam Wallpaper Engine collection. It uses native Wayland tools for rendering, avoiding the need for Wine/Proton to run the wallpapers themselves. I just made a hard-fork of this project because of how much I changed, and I really didn't want to integrate it with the original repo here (it looked to be all vibe coded anyway). Not to hate, a significant portion of this project was generated by AI, as I hate UI development.

Disclaimer: This is a community project and is not affiliated with Wallpaper Engine or its developers. It supports a subset of wallpapers (video, web, and basic scenes) and may not render all effects perfectly.


Features

  • Multi-Type Support:

    • Video: Plays video files using the efficient mpvpaper.
    • Web: Renders HTML, JS, and CSS based wallpapers using a WebKitGTK view.
    • Scene: Renders fully animated 2D and 3D scenes using linux-wallpaperengine, bringing 100% shader-accurate animations natively to Linux Wayland/X11.
  • Feature-Rich GUI: A modern GTK4 application for browsing, searching, and filtering your installed wallpapers.

  • Per-Wallpaper Properties: Adjust speed, audio playback, and scaling mode (Cover, Contain, Fill) for video wallpapers directly from the GUI.

  • Multi-Monitor Management: Apply wallpapers to specific monitors or all monitors at once. Save and load entire multi-monitor configurations.

  • Panel Margin Configuration: Set pixel offsets for top, bottom, left, and right edges to prevent wallpapers from drawing underneath panels like Waybar.

  • Native Wayland Integration: Uses mpvpaper for videos and gtk4-layer-shell for Web/Scene types, ensuring low resource usage and proper placement on the background layer without complex window rules.

  • Powerful CLI: A script for power users to set, stop, and load wallpaper configurations from the terminal.


How It Works

  1. GUI (gui.py): The primary and recommended way to interact with the system. It scans the Wallpaper Engine directory, displays previews, and provides controls for applying wallpapers and adjusting settings.
  2. Configuration: The GUI saves your settings into two files in ~/.config/HyprWpE/:
    • wallpapers.yaml: Stores your multi-monitor wallpaper setups.
    • properties.yaml: Stores per-wallpaper properties (like speed, audio) and global settings like panel margins.
  3. Backend Script (HyprWpE.sh): This script is called by the GUI (and can be used directly) to perform the main logic.
    • It takes a Wallpaper Engine ID and a monitor name.
    • It reads the wallpaper's project.json to determine its type (video, web, or scene).
    • If assets are packed in a .pkg archive, unpacker.py is used to extract them into /tmp/HyprWpE.
    • It launches the appropriate renderer for the wallpaper type:
      • Video: mpvpaper displays the video on the target monitor, using properties from properties.yaml.
      • Web: web_viewer.py launches a gtk4-layer-shell window with an embedded web view.
      • Scene: linux-wallpaperengine is launched directly, processing the .pkg and shaders natively to render the animated 3D scene on the Wayland root layer.
  4. Layering: The web_viewer.py uses the gtk4-layer-shell protocol, while linux-wallpaperengine utilizes its native rendering paths to instruct Hyprland to place them on the background layer, making them function as proper wallpapers.

Prerequisites

  • Hyprland: This is designed specifically for the Hyprland Wayland compositor.
  • Wallpaper Engine: You must own Wallpaper Engine on Steam and have wallpapers downloaded.
  • Python 3
  • Dependencies: You will need the following packages: mpvpaper, jq, yq, gtk4, webkitgtk-6.0, python-gobject, gtk4-layer-shell, cmake, gcc, ninja, pkgconf, wayland, wayland-protocols, egl-wayland, glew, glm, sdl2, mpv, ffmpeg, lz4.

Installation

  1. Clone the repository:

    git clone https://github.com/linuxnoodle/HyprWpE
    cd HyprWpE
  2. Install dependencies (example for Arch Linux):

    sudo pacman -S mpvpaper jq yq python-gobject python-yaml webkitgtk-6.0 gtk4 gtk4-layer-shell cmake gcc ninja pkgconf wayland wayland-protocols egl-wayland glew glm sdl2 mpv ffmpeg lz4
    # or using an aur helper like paru
    paru -S mpvpaper jq yq python-gobject python-yaml webkitgtk-6.0 gtk4 gtk4-layer-shell cmake gcc ninja pkgconf wayland wayland-protocols egl-wayland glew glm sdl2 mpv ffmpeg lz4

    Note: The yq required by this project is the Python implementation. If your package manager provides multiple, ensure you install the one based on Python, not the one written in Go.

  3. Run the installation script:

    This will automatically download and patch linux-wallpaperengine to support native 2D/3D scene wallpapers.

    chmod +x install.sh
    ./install.sh

Usage

GUI (Recommended)

The easiest way to use the application is through the GUI.

  1. Launch the selector:
    python gui.py
  2. Select your monitor from the dropdown menu.
  3. Click on a wallpaper to apply it instantly.
  4. If a wallpaper is selected, a properties sidebar will appear. For video wallpapers, you can adjust settings here. Click "Apply Changes" to see them take effect.
  5. Use the "Configure Offset" button to set panel margins. Any running Web or Scene wallpapers will need to be relaunched to see the change.
  6. Click "Save Setup" to save your current wallpaper configuration for all monitors. This saved setup can be loaded automatically at startup.

Command Line

The HyprWpE.sh script can be used for scripting or manual control.

  1. Find a Wallpaper ID: Navigate to your Wallpaper Engine workshop directory to find IDs: ls ~/.steam/steam/steamapps/workshop/content/431960

  2. Set a wallpaper:

    # Set wallpaper on the default monitor
    ./HyprWpE.sh <ID_of_the_wallpaper>
    
    # Set wallpaper on a specific monitor
    ./HyprWpE.sh 822865320 DP-1
  3. Stop all wallpapers:

    ./HyprWpE.sh stop
  4. Load a saved setup:

    # With no arguments, loads the default config and applies it
    ./HyprWpE.sh
    
    # Explicitly load the default or a specific config file
    ./HyprWpE.sh --load-config
    ./HyprWpE.sh --load-config ~/.config/HyprWpE/my_other_setup.yaml

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages