Bevy Live Wallpaper
A Bevy plugin that renders your scene into a Wayland layer-shell surface, an X11 root window, or a Windows desktop background.

Compatibility
| Bevy Version | Crate Version |
|---|---|
0.17 |
0.1,0.2 |
Requirements
- Wayland: A compositor that advertises
zwlr_layer_shell_v1(e.g. Sway, Hyprland, River, Niri). - X11: An X server with the RandR extension enabled (standard on modern desktops).
- Windows: The standard desktop environment.
Configuration
- On Windows, the appropriate backend is selected automatically. No features need to be enabled.
- On Linux/BSD, enable the backend feature that matches your session
(
waylandorx11). Only one backend should be enabled at a time.
# In your Cargo.toml
# For Windows:
[]
= "0.2.0"
# For Linux/BSD (Wayland):
[]
= { = "0.2.0", = ["wayland"] }
# For Linux/BSD (X11):
[]
= { = "0.2.0", = ["x11"] }
Usage
Add the LiveWallpaperPlugin to your app. To make your application
cross-platform, you will need to use conditional compilation (#[cfg]) for
platform-specific setup.
- On Wayland/X11, you must disable the primary window and add the
LiveWallpaperCameracomponent to the camera you want to render. - On Windows, the plugin will automatically find the primary window and
parent it to the desktop background.
LiveWallpaperCamerais not required, but keeping it attached is harmless.
Here is a complete, cross-platform example:
use *;
use ;
Examples
The included examples are cross-platform.
- Run on Wayland (Linux/BSD):
# or
- Run on X11 (Linux/BSD):
# or
- Run on Windows:
Known Issues
- On Windows, with Intel integrated graphics, the Vulkan backend may not work for setting the desktop background. In such cases, it is necessary to use the DX12 backend.
- On Wayland, cursor position is only reported while the pointer is directly over the layer surface; If another window is on top (or the pointer isn't reaching the background), the position won't update. This is a Wayland protocol limitation.
Credits & References
- comavius/wayggle-bg — licensed under the MIT License; portions of the Wayland layer-shell backend are adapted from this project.
- ohkashi/LiveWallpaper — licensed under the MIT License; the Windows WorkerW discovery and wallpaper lifecycle logic are adapted from this project.
- zuranthus/LivePaper — licensed under the MIT License; the X11 background attachment strategy is inspired by this project.