Run a Shadertoy-compatible shader as an animated wallpaper on Wayland. Requires running a wlroots-compatible Wayland compositor.
2025-05-18_21-12-16.mp4
Shader: Balatro main menu background shader (not publicly available)
Shader: Seascape by TDM - https://www.shadertoy.com/view/Ms2SD1
Shader: Auroras by Nimitz - https://www.shadertoy.com/view/XtGGRt
You'll most likely have these installed if you have a Wayland compositor anyway.
- Debian and variants:
libwayland-client0 libwayland-egl1 libegl1 libglvnd0 libffi8
- Gentoo:
dev-util/wayland media-libs/glvnd dev-libs/libffi
Either download the latest release or follow the build instructions below.
Place papertoy
somewhere in your PATH
(e.g. .local/bin
).
Once I'm happy with the stability I'll probably go for system packages.
Run the binary with the path to a Shadertoy shader as an argument:
$ zig-out/bin/papertoy /path/to/shader.glsl
Important
Currently, only shaders that don't use any channels are supported. This is being worked on.
Options:
--output <id>
: Render to this Wayland output index (default:0
)--frame-rate <fps>
: Limit the frame rate of the shader (default: output refresh rate)--resolution <WxH>
: Limit the resolution the shader is rendered at (default: output native resolution)
nix run .
- There is no second step.
You can add the flake to your profile with: nix profile install github:sin-ack/papertoy/<version>
- Zig master (tested version:
0.15.0-dev.1149+4e6a04929
) libwayland
- Debian and variants:
libwayland-dev
- Gentoo:
dev-util/wayland
- Debian and variants:
libglvnd
- Debian and variants:
libglvnd-dev
- Gentoo:
media-libs/glvnd
- Debian and variants:
- Install the listed dependencies above.
- Clone the repository.
- Run
zig build -Doptimize=ReleaseFast
The binary will be located at zig-out/bin/papertoy
.
Copyright (c) 2025, sin-ack. Released under the GNU General Public License, version 3.
The Shadertoy preamble is from the Ghostty project. Copyright (c) 2024 Mitchell Hashimoto, License: MIT
The wlr-layer-shell-unstable-v1 protocol is from the wlr-protocols project. Copyright (c) 2017 Drew DeVault, License: MIT