# linux-wallpaperengine-kde A fork of [Almamu/linux-wallpaperengine](https://github.com/Almamu/linux-wallpaperengine), reworked for KDE Plasma and Wayland. It plays Wallpaper Engine (Steam app 431960) live wallpapers on Linux: scene/parallax backgrounds, video (via mpv), and web/HTML backgrounds (via CEF), rendered with a from-scratch OpenGL reimplementation of Wallpaper Engine's renderer. No GUI. This is a command-line tool driven entirely by flags - see Usage below. ## What's different from upstream - Native Wayland output via `wlr-layer-shell`, in addition to the original X11 path. - KDE-specific fullscreen-pause detection over the `plasma-shell` protocol, since KWin doesn't implement `wlr-foreign-toplevel-management` like other wlroots compositors. Still experimental (see Limitations). - Multi-monitor handling: per-screen backgrounds (`--screen-root`), one wallpaper spanning several monitors (`--screen-span`), per-screen scaling/clamping/zoom/corner color, and Workshop playlists (`--playlist`). - A global playback speed multiplier (`--speed`), separate from the FPS cap. - Video wallpapers can loop just part of the video (`--video-start`/`--video-end`), e.g. only minute 3 to 4 of a 5 minute clip. - More granular audio: restrict sound to a single screen (`--audio-screen`), a separate ambient volume for non-video backgrounds (`--ambient-volume`), per-object sound volume (`--sound-volume`), and a tunable multiplier on audio-reactive properties (`--audio-sensitivity`, with `--list-audio-objects` to see what's wired up). - Live hotswap of the running wallpaper via `SIGUSR1`, no process restart. - Layer introspection/toggling (`--list-objects`, `--disable-object`, `--enable-object`) for layers the wallpaper author didn't expose as a configurable property. ## Requirements - OpenGL 3.3 - CMake - LZ4, Zlib - SDL2 - FFmpeg - X11 or Wayland (Xrandr on X11) - GLFW3, GLEW, GLUT, GLM - MPV - PulseAudio - FFTW3 - FreeType, HarfBuzz - D-Bus (for the KDE integration, see Build) - V8 10.2 or newer, as shipped in Node.js's shared library (`libnode`): scene scripts run on it like in Wallpaper Engine. CMake looks for `v8.h` under `include/node` and `libnode`; point `-DV8_INCLUDE_DIR`/`-DV8_LIBRARY` at another V8 build if yours lives elsewhere ### Ubuntu 22.04 Its `libnode-dev` (Node.js 12) is too old for the scripting, install a newer Node.js `libnode` or use 24.04. ```bash sudo apt-get update sudo apt-get install build-essential cmake libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl-dev libglew-dev freeglut3-dev libsdl2-dev liblz4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libxxf86vm-dev libglm-dev libglfw3-dev libmpv-dev mpv libmpv1 libpulse-dev libpulse0 libfftw3-dev libfreetype-dev libharfbuzz-dev libdbus-1-dev ``` ### Ubuntu 24.04 ```bash sudo apt-get update sudo apt-get install build-essential cmake libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl-dev libglew-dev freeglut3-dev libsdl2-dev liblz4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libxxf86vm-dev libglm-dev libglfw3-dev libmpv-dev mpv libmpv2 libpulse-dev libpulse0 libfftw3-dev libfreetype-dev libharfbuzz-dev libdbus-1-dev libnode-dev ``` ### Fedora 42 ```bash sudo dnf update sudo dnf install gcc g++ cmake libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel mesa-libGL-devel glew-devel freeglut-devel SDL2-devel lz4-devel ffmpeg ffmpeg-free-devel libXxf86vm-devel glm-devel glfw-devel mpv mpv-devel pulseaudio-libs-devel fftw-devel freetype-devel harfbuzz-devel gmp-devel dbus-devel nodejs-devel ``` On Fedora 44 pick the versioned package of the Node.js you have, `nodejs24-devel` or `nodejs22-devel`. ### Arch Linux Arch's `nodejs` package has the headers but no `libnode`, the AUR's `libnode` package (a Node.js built with `--shared`) provides it. ### ALT Linux ```bash sudo epm update sudo epm install gcc-c++ make cmake libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel libGL-devel libGLEW-devel freeglut-devel libSDL2-devel liblz4-devel libavcodec-devel libavformat-devel libavutil-devel libswscale-devel libXxf86vm-devel libglm-devel libglfw3-devel libmpv-devel mpv libpulseaudio-devel libpulseaudio libfftw3-devel libpng-devel libffi-devel libswresample-devel libgmpxx-devel libfreetype-devel libharfbuzz-devel libdbus-devel ``` ## Prebuilt downloads Tagged releases on the [releases page](https://github.com/WallpaperEngineLover/linux-wallpaperengine-kde/releases) have ready-to-run builds for Ubuntu 24.04 and Fedora 44, each with (`kde`) and without (`generic`) the KDE Plasma integration. They use the distro's own ffmpeg, mpv, GLFW and so on, so pick the one for your distro and install the runtime packages from the list above (the non `-dev`/`-devel` ones). Arch users build from source for now. ```bash tar xzf linux-wallpaperengine-kde-fedora-44-x86_64.tar.gz ./linux-wallpaperengine-kde-fedora-44-x86_64/linux-wallpaperengine --help ``` The folder can live anywhere, the binary finds its libraries next to itself. ## Build ```bash git clone --recurse-submodules cd linux-wallpaperengine-kde mkdir build && cd build cmake -DCMAKE_BUILD_TYPE='Release' .. make ``` The binary and support files end up in `build/output`. The KDE Plasma integration (plasma-shell desktop surfaces, cursor tracking through KWin, fullscreen detection) is built in by default and only kicks in inside a Plasma session, other desktops use the generic Wayland/X11 paths. It needs the D-Bus development files. To build without it: ```bash cmake -DCMAKE_BUILD_TYPE='Release' -DDISABLE_KDE_FEATURES=ON .. ``` The "pause on fullscreen" feature on KDE Plasma also needs the [KWin Maximize Detector](https://github.com/LS-FCEFyN/Maximize-Detector) script installed separately. ## Assets You need Wallpaper Engine installed through Steam - this is where the backgrounds and shared assets come from. The binary looks for it automatically under: ``` ~/.steam/steam/steamapps/common ~/.local/share/Steam/steamapps/common ~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common ~/snap/steam/common/.local/share/Steam/steamapps/common ``` If it isn't found there, either copy the `assets` folder from Wallpaper Engine's install directory (Steam -> Wallpaper Engine -> Manage -> Browse local files) next to the `linux-wallpaperengine` binary, or point at it directly: ```bash linux-wallpaperengine --assets-dir /path/to/assets ``` ## Usage ```bash linux-wallpaperengine [options] ``` The background can be a Steam Workshop ID (`1845706469`) or a path to a background folder. ### Options | Option | Description | |--------|-------------| | `--silent` | Mute background audio | | `--volume ` | Set audio volume | | `--automute` | Mute when other apps play audio | | `--noautomute` | Don't mute when other apps play audio (default) | | `--no-audio-processing` | Disable audio reactive features | | `--fps ` | Limit frame rate | | `--window ` | Run in windowed mode with custom size/position | | `--screen-root ` | Set as background for a specific screen | | `--screen-span ,,...` | Stretch a single wallpaper across multiple screens | | `--bg ` | Assign a background to a screen (used after `--screen-root`/`--screen-span`) | | `--playlist ` | Cycle through a Wallpaper Engine playlist from `config.json` | | `--scaling ` | `stretch`, `fit`, `fill`, `center`, `free`, or `default` | | `--zoom ` | Manual zoom on top of `--scaling`, e.g. `1.5` in, `0.5` out | | `--alignment-position <0-100>` | Wallpaper Engine's alignment position: where `fill`/`default` crop and `fit` letterboxes (default 50) | | `--alignment-x <0-100>`, `--alignment-y <0-100>` | Placement for `center` and `free` (default 50, 0 = left/top) | | `--alignment-zoom <0-200>` | Zoom for `free` (default 100 = native size) | | `--clamp ` | Texture clamping: `clamp` (edge), `border`, `repeat`. Default `border` | | `--corner-color ` | Color outside the wallpaper's bounds when `--clamp border`, as `RRGGBB`/`RRGGBBAA`. Default `000000` | | `--layer ` | Wayland only: `wlr-layer-shell` layer (`background`, `bottom`, `top`, `overlay`) | | `--speed ` | Global playback speed multiplier | | `--video-start